Skip to content

Package: DeviceConnectionCreator

DeviceConnectionCreator

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2020 Eurotech and/or its affiliates and others
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v1.0
6: * which accompanies this distribution, and is available at
7: * http://www.eclipse.org/legal/epl-v10.html
8: *
9: * Contributors:
10: * Eurotech - initial API and implementation
11: *******************************************************************************/
12: package org.eclipse.kapua.service.device.registry.connection;
13:
14: import org.eclipse.kapua.model.KapuaUpdatableEntityCreator;
15: import org.eclipse.kapua.model.id.KapuaId;
16: import org.eclipse.kapua.service.device.registry.ConnectionUserCouplingMode;
17:
18: import javax.xml.bind.annotation.XmlElement;
19:
20: /**
21: * Device connection creator service definition.
22: *
23: * @since 1.0
24: */
25: public interface DeviceConnectionCreator extends KapuaUpdatableEntityCreator<DeviceConnection> {
26:
27: /**
28: * Get the device connection status
29: *
30: * @return
31: */
32: @XmlElement(name = "status")
33: DeviceConnectionStatus getStatus();
34:
35: /**
36: * Set the device connection status
37: *
38: * @param status
39: */
40: void setStatus(DeviceConnectionStatus status);
41:
42: /**
43: * Get the client identifier
44: *
45: * @return
46: */
47: String getClientId();
48:
49: /**
50: * Set the client identifier
51: *
52: * @param clientId
53: */
54: void setClientId(String clientId);
55:
56: /**
57: * Get the user identifier
58: *
59: * @return
60: */
61: KapuaId getUserId();
62:
63: /**
64: * Set the user identifier
65: *
66: * @param userId
67: */
68: void setUserId(KapuaId userId);
69:
70: /**
71: * Get the device connection user coupling mode.
72: *
73: * @return
74: */
75: ConnectionUserCouplingMode getUserCouplingMode();
76:
77: /**
78: * Set the device connection user coupling mode.
79: *
80: * @param userCouplingMode
81: */
82: void setUserCouplingMode(ConnectionUserCouplingMode userCouplingMode);
83:
84: /**
85: * Get the reserved user identifier
86: *
87: * @return
88: */
89: KapuaId getReservedUserId();
90:
91: /**
92: * Set the reserved user identifier
93: *
94: * @param reservedUserId
95: */
96: void setReservedUserId(KapuaId reservedUserId);
97:
98: /**
99: * Gets whether or not the {@link DeviceConnection} can change user on the next login.
100: *
101: * @return <code>true</code> if device can changhe user to connect, <code>false</code> if not.
102: */
103: @XmlElement(name = "allowUserChange")
104: boolean getAllowUserChange();
105:
106: /**
107: * Sets whether or not the {@link DeviceConnection} can change user on the next login.
108: *
109: * @param allowUserChange
110: */
111: void setAllowUserChange(boolean allowUserChange);
112:
113: /**
114: * Get the device protocol
115: *
116: * @return
117: */
118: String getProtocol();
119:
120: /**
121: * Set the device protocol
122: *
123: * @param protocol
124: */
125: void setProtocol(String protocol);
126:
127: /**
128: * Get the client ip
129: *
130: * @return
131: */
132: String getClientIp();
133:
134: /**
135: * Set the client ip
136: *
137: * @param clientIp
138: */
139: void setClientIp(String clientIp);
140:
141: /**
142: * Get the server ip
143: *
144: * @return
145: */
146: String getServerIp();
147:
148: /**
149: * Set the server ip
150: *
151: * @param serverIp
152: */
153: void setServerIp(String serverIp);
154: }