public class EcomEventControllerListener extends Object implements EventControllerListener
Constructor and Description |
---|
EcomEventControllerListener() |
Modifier and Type | Method and Description |
---|---|
<D extends Device,E extends Event<D>> |
addEventHandler(String deviceType,
EventHandler<D,E> eventHandler)
Add an event handler for all device with the specific type.
|
<D extends Device,E extends Event<D>> |
addEventHandler(String deviceType,
EventHandler<D,E> eventHandler,
D device)
Add an event handler on a specific device
|
<D extends Device> |
onError(Class<D> deviceType,
D device)
An error occurred on a device.
|
<D extends Device> |
onEvent(Class<D> deviceType,
D device)
An event occurred on a device.
|
<D extends Device> |
onRegister(Class<D> deviceType,
D device)
Registers a new device with the given type.
|
<D extends Device> |
onUnregister(D device)
Unregisters the given device.
|
<D extends Device,E extends Event<D>> |
removeEventHandler(EventHandler<D,E> eventHandler)
Remove the handler.
|
public <D extends Device,E extends Event<D>> void addEventHandler(String deviceType, EventHandler<D,E> eventHandler)
EventControllerListener
addEventHandler
in interface EventControllerListener
public <D extends Device,E extends Event<D>> void addEventHandler(String deviceType, EventHandler<D,E> eventHandler, D device)
EventControllerListener
addEventHandler
in interface EventControllerListener
public <D extends Device> void onError(Class<D> deviceType, D device)
ControllerListener
onError
in interface ControllerListener
D
- the type of the device to be registereddeviceType
- the type of the device to be registereddevice
- the device itselfpublic <D extends Device> void onEvent(Class<D> deviceType, D device)
ControllerListener
onEvent
in interface ControllerListener
D
- the type of the device to be registereddeviceType
- the type of the devicedevice
- the device itselfpublic <D extends Device> void onRegister(Class<D> deviceType, D device)
ControllerListener
onRegister
in interface ControllerListener
D
- the type of the device to be registereddeviceType
- the type of the device to be registereddevice
- the device to be registeredpublic <D extends Device> void onUnregister(D device)
ControllerListener
onUnregister
in interface ControllerListener
D
- the type of the device to be registereddevice
- the device to be unregisteredpublic <D extends Device,E extends Event<D>> void removeEventHandler(EventHandler<D,E> eventHandler)
EventControllerListener
removeEventHandler
in interface EventControllerListener