public class DeviceServiceProxy extends ej.kf.Proxy<DeviceService> implements DeviceService
DeviceService
.Constructor and Description |
---|
DeviceServiceProxy() |
Modifier and Type | Method and Description |
---|---|
void |
addConfigListener(ConfigListener listener)
Adds a configuration listener notified when the config of the device changes.
|
void |
removeConfigListener(ConfigListener listener)
Removes a configuration listener.
|
void |
setEvent(byte[] data)
Sets events.
|
void |
setState(byte[] data)
Sets the state of Device.
|
void |
setSubEvent(java.lang.String subEvent,
byte[] data)
Sets sub-events.
|
public void setState(byte[] data) throws java.io.IOException
DeviceService
setState
in interface DeviceService
data
- application-dependent state datajava.io.IOException
- on connection issues and errors of communicationpublic void setEvent(byte[] data) throws java.io.IOException
DeviceService
setEvent
in interface DeviceService
data
- application-dependent event datajava.io.IOException
- on connection issues and errors of communicationpublic void setSubEvent(java.lang.String subEvent, byte[] data) throws java.io.IOException
DeviceService
setSubEvent
in interface DeviceService
subEvent
- the wanted sub-folder of eventsdata
- application-dependent sub-event datajava.io.IOException
- on connection issues and errors of communicationpublic void addConfigListener(ConfigListener listener) throws java.io.IOException
DeviceService
addConfigListener
in interface DeviceService
listener
- the right ConfigListener that will get notifiedjava.io.IOException
- on subscription error to the config topicpublic void removeConfigListener(ConfigListener listener) throws java.io.IOException
DeviceService
removeConfigListener
in interface DeviceService
listener
- the right ConfigListener that will get notifiedjava.io.IOException
- on subscription error to the config topic