public class TcpBridgeAdapter extends java.lang.Object implements TcpBridgeListener
Constructor and Description |
---|
TcpBridgeAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
notifyAgentConnection(java.lang.String agentName,
boolean connected)
Fired when a new agent in the same session connects or an already
connected agent disconnects.
|
void |
notifyRelayConnection(boolean connected)
Fired when the connection to the relay is established or broken.
|
void |
pipeRequest(java.lang.String source,
java.lang.String destination,
int[] data)
Fired when the bridge gets data from an agent.
|
public void pipeRequest(java.lang.String source, java.lang.String destination, int[] data)
pipeRequest
in interface TcpBridgeListener
source
- the agent that sends the datadestination
- the node name that the source agent indicates as destinationdata
- the data as integer array of any lenghtpublic void notifyRelayConnection(boolean connected)
notifyRelayConnection
in interface TcpBridgeListener
connected
- true, if the connection is established; otherwise falsepublic void notifyAgentConnection(java.lang.String agentName, boolean connected)
notifyAgentConnection
in interface TcpBridgeListener
agentName
- the nickname of the agent that connects or disconnectsconnected
- true, if the connection is established; otherwise false