public class ZigBeePassthroughManager extends Object
Constructor and Description |
---|
ZigBeePassthroughManager(Executor clientEventExecutor,
Collection<ConnectionInfo> localDeviceConnectionInfos,
Function<ConnectionInfo,Optional<com.mmbnetworks.gatewayapi.ZigBeePassthroughDevice>> getPassthroughDevice)
Constructs the ZigBeePassthroughManager
|
Modifier and Type | Method and Description |
---|---|
boolean |
deregisterReceivedZigBeeFrameListener(ConnectionInfo info,
Consumer<ZigBeeFrame> listener)
De-registers a sent frame listener
|
boolean |
deregisterSendZigBeeFrameListener(ConnectionInfo info,
Consumer<ZigBeeFrame> listener)
De-registers a sent frame listener
|
boolean |
registerReceivedZigBeeFrameListener(ConnectionInfo info,
Consumer<ZigBeeFrame> listener)
Registers a received frame listener
|
boolean |
registerSendZigBeeFrameListener(ConnectionInfo info,
Consumer<ZigBeeFrame> listener)
Registers a frame listener to listen in on sent frames
|
byte |
sendZigBeeFrame(ConnectionInfo connectionInfo,
ZigBeeFrame frame)
Sends a raw zigbee frame to the device
|
public ZigBeePassthroughManager(Executor clientEventExecutor, Collection<ConnectionInfo> localDeviceConnectionInfos, Function<ConnectionInfo,Optional<com.mmbnetworks.gatewayapi.ZigBeePassthroughDevice>> getPassthroughDevice)
clientEventExecutor
- the executor where it is used to call all the listenerslocalDeviceConnectionInfos
- the local devices connected to GAPIgetPassthroughDevice
- Function that returns a passthrough device tied to the ConnectionInfoNullPointerException
- if clientEventExecutor, localDeviceConnectionInfo, and getPassthroughDevice is nullpublic boolean registerSendZigBeeFrameListener(ConnectionInfo info, Consumer<ZigBeeFrame> listener)
info
- The locally connected device connection information that the listener should listen onlistener
- the listener to listen in on a zigbee frametrue
if the listener has been successfully registered, false
otherwiseNullPointerException
- if info, and listener are nullpublic boolean deregisterSendZigBeeFrameListener(ConnectionInfo info, Consumer<ZigBeeFrame> listener)
info
- The locally connected device connection information the client is listening in onlistener
- the listener to listen for zigbee frame eventsTrue
if the listener has been successfully registered, false
otherwiseNullPointerException
- if info and listener are nullpublic boolean registerReceivedZigBeeFrameListener(ConnectionInfo info, Consumer<ZigBeeFrame> listener)
info
- The locally connected device connection information the client is listening in onlistener
- the listener to listen for zigbee frame eventsTrue
if the listener has been successfully registered, false
otherwiseNullPointerException
- if info and listener are nullpublic boolean deregisterReceivedZigBeeFrameListener(ConnectionInfo info, Consumer<ZigBeeFrame> listener)
info
- The locally connected device connection information the client is listening in onlistener
- the listener to listen for zigbee frame eventsTrue
if the listener has been successfully registered, false
otherwiseNullPointerException
- if info and listener are nullpublic byte sendZigBeeFrame(ConnectionInfo connectionInfo, ZigBeeFrame frame)
connectionInfo
- The locally connected device connection information the client is listening in onframe
- ZigBee FrameIllegalArgumentException
- if passed in connectionInfo is invalidNullPointerException
- if connectionInfo, and frame is nullCopyright © 2020. All rights reserved.