public interface IGatewayModule
Modifier and Type | Method and Description |
---|---|
void |
create(long moduleAddr,
Broker broker,
String configuration)
The create method is called when the native Gateway creates the Module.
|
void |
destroy()
The destroy method is called on a
GatewayModule before it is about to be "destroyed" and removed from the gateway. |
void |
receive(byte[] source)
The receive method is called on a
GatewayModule whenever it receives a message. |
void |
start()
The start method is called when the native Gateway has created all modules to notify each module that it is safe
to start sending messages.
|
void create(long moduleAddr, Broker broker, String configuration)
moduleAddr
- The address of the native module pointerbroker
- The Broker
to which this module belongsconfiguration
- The configuration for this module represented as a JSON stringvoid start()
void receive(byte[] source)
GatewayModule
whenever it receives a message.
The destroy() and receive() methods are guaranteed to not be called simultaneously.source
- The serialized messagevoid destroy()
GatewayModule
before it is about to be "destroyed" and removed from the gateway.
Once a module is removed from the gateway, it may no longer send or receive messages.
The destroy() and receive() methods are guaranteed to not be called simultaneously.Copyright © 2018. All rights reserved.