Skip to content

Package: DeviceEventCreator

DeviceEventCreator

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.event;
14:
15: import org.eclipse.kapua.message.KapuaPosition;
16: import org.eclipse.kapua.model.KapuaEntityCreator;
17: import org.eclipse.kapua.model.id.KapuaId;
18: import org.eclipse.kapua.service.device.management.message.KapuaMethod;
19: import org.eclipse.kapua.service.device.management.message.response.KapuaResponseCode;
20:
21: import java.util.Date;
22:
23: /**
24: * Device event creator service definition.
25: *
26: * @since 1.0
27: */
28: public interface DeviceEventCreator extends KapuaEntityCreator<DeviceEvent> {
29:
30: /**
31: * Get the device identifier
32: *
33: * @return
34: */
35: KapuaId getDeviceId();
36:
37: /**
38: * Set the device identifier
39: *
40: * @param deviceId
41: */
42: void setDeviceId(KapuaId deviceId);
43:
44: /**
45: * Get the sent on date
46: *
47: * @return
48: */
49: Date getSentOn();
50:
51: /**
52: * Set the sent on date
53: *
54: * @param sentOn
55: */
56: void setSentOn(Date sentOn);
57:
58: /**
59: * Get the received on date
60: *
61: * @return
62: */
63: Date getReceivedOn();
64:
65: /**
66: * Set the received on date
67: *
68: * @param receivedOn
69: */
70: void setReceivedOn(Date receivedOn);
71:
72: /**
73: * Get device position
74: *
75: * @return
76: */
77: KapuaPosition getPosition();
78:
79: /**
80: * Set device position
81: *
82: * @param position
83: */
84: void setPosition(KapuaPosition position);
85:
86: /**
87: * Get resource
88: *
89: * @return
90: */
91: String getResource();
92:
93: /**
94: * Set resource
95: *
96: * @param resource
97: */
98: void setResource(String resource);
99:
100: /**
101: * GHet action
102: *
103: * @return
104: */
105: KapuaMethod getAction();
106:
107: /**
108: * Set action
109: *
110: * @param action
111: */
112: void setAction(KapuaMethod action);
113:
114: /**
115: * Get response code
116: *
117: * @return
118: */
119: KapuaResponseCode getResponseCode();
120:
121: /**
122: * Set response code
123: *
124: * @param responseCode
125: */
126: void setResponseCode(KapuaResponseCode responseCode);
127:
128: /**
129: * Get event message
130: *
131: * @return
132: */
133: String getEventMessage();
134:
135: /**
136: * Set event message
137: *
138: * @param eventMessage
139: */
140: void setEventMessage(String eventMessage);
141: }