Skip to content

Package: DeviceLifeCycleService

DeviceLifeCycleService

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.device.registry.lifecycle;
14:
15: import org.eclipse.kapua.KapuaException;
16: import org.eclipse.kapua.message.device.lifecycle.KapuaAppsMessage;
17: import org.eclipse.kapua.message.device.lifecycle.KapuaBirthMessage;
18: import org.eclipse.kapua.message.device.lifecycle.KapuaDisconnectMessage;
19: import org.eclipse.kapua.message.device.lifecycle.KapuaMissingMessage;
20: import org.eclipse.kapua.model.id.KapuaId;
21: import org.eclipse.kapua.service.KapuaService;
22:
23: /**
24: * Device life cycle service definition.<br>
25: * This service handles the life cycle messages coming from the device.
26: *
27: * @since 1.0
28: */
29: public interface DeviceLifeCycleService extends KapuaService {
30:
31: /**
32: * Processes a birth certificate for a device, creating or updating the device footprint with the information supplied.
33: *
34: * @param connectionId
35: * @param message
36: * @throws KapuaException
37: */
38: <M extends KapuaBirthMessage> void birth(KapuaId connectionId, M message) throws KapuaException;
39:
40: /**
41: * Processes a death certificate for a device, updating the device footprint with the information supplied.
42: *
43: * @param connectionId
44: * @param message
45: * @throws KapuaException
46: */
47: <M extends KapuaDisconnectMessage> void death(KapuaId connectionId, M message) throws KapuaException;
48:
49: /**
50: * Processes a last-will testament for a device, updating the device footprint with the information supplied.
51: *
52: * @param connectionId
53: * @param message
54: * @throws KapuaException
55: */
56: <M extends KapuaMissingMessage> void missing(KapuaId connectionId, M message) throws KapuaException;
57:
58: /**
59: * Processes a birth certificate for a device, creating or updating the device footprint with the information supplied.
60: *
61: * @param connectionId
62: * @param message
63: * @throws KapuaException
64: */
65: <M extends KapuaAppsMessage> void applications(KapuaId connectionId, M message) throws KapuaException;
66: }