Modifier and Type | Method and Description |
---|---|
void |
RouterConnectionClient.acceptConnection(DeviceInfo peer)
accept the connection request from a peer device.
|
void |
RouterConnectionClient.connect(DeviceInfo peerInfo,
byte[] token,
int timeout)
send connection request to peer device.
|
void |
RouterConnectionClient.denyConnection(DeviceInfo peer,
int rejectCode)
deny the connection request from a peer device and tell the reason.
|
void |
RouterConnectionClient.disconnect(DeviceInfo peerInfo)
disconnect a connected peer device.
|
void |
RouterConnectionClient.ConnectionHandler.onConnected(DeviceInfo peerInfo)
Notify client that a peer device successfully connected to this device;
either because the client accept peer connection request or peer accept the client's
connection request.
|
void |
RouterConnectionClient.ConnectionHandler.onConnecting(DeviceInfo device,
byte[] token)
Notify client a peer device is trying to connect to this device.
|
void |
RouterConnectionClient.ConnectionHandler.onConnectionFailed(DeviceInfo device,
int rejectCode)
Notify client its attempt to connect to peer device failed.
|
void |
RouterConnectionClient.ConnectionHandler.onDisconnected(DeviceInfo peerInfo)
Notify client a peer device disconnected;
either because the client or its peer called disconnect() api; or
because network failed.
|
void |
RouterConnectionClient.ConnectionHandler.onGetDeviceInfo(DeviceInfo device)
Reply to client info about this device; This is the response to getDeviceInfo() api call.
|
void |
RouterConnectionClient.ConnectionHandler.onGetPeerDevices(DeviceInfo[] devices)
Reply to client info about peer devices connected to this device.
|
void |
RouterGroupClient.GroupHandler.onGetPeerDevices(DeviceInfo[] devices)
Reply to client info of peer devices in group; this is the response to getPeerDevices() api call.
|
void |
RouterGroupClient.GroupHandler.onPeerJoin(DeviceInfo peerInfo)
notify client that a peer device joined the group.
|
void |
RouterGroupClient.GroupHandler.onPeerLeave(DeviceInfo peerInfo)
notify client that a peer device has left the group.
|
void |
RouterGroupClient.GroupHandler.onReceive(DeviceInfo src,
byte[] msg)
notify client that a message arrived from a peer device.
|
void |
RouterConnectionClient.ConnectionHandler.onSearchFoundDevice(DeviceInfo device,
boolean useSSL)
Notify clients in a search session a device is found.
|
void |
RouterConnectionClient.ConnectionHandler.onSearchStart(DeviceInfo groupLeader)
Notify client a search session started; It is the response to startSearch() api call.
|
void |
RouterGroupClient.GroupHandler.onSelfJoin(DeviceInfo[] peersInfo)
notify clients that it has joined the group successfully; and returning the info
of peer devices in this group.
|
void |
RouterGroupClient.send(DeviceInfo dest,
byte[] msg)
send a message to all peers in a group, or to a specific device.
|
void |
RouterConnectionClient.startPeerSearch(DeviceInfo groupLeader,
int timeout)
start a new search session to find peer devices.
|
Constructor and Description |
---|
RouterGroupClient(Context c,
java.lang.String grp,
DeviceInfo[] p,
RouterGroupClient.GroupHandler h)
RouterGroupClient constructor; register a GroupHandler to expose client side one-way asynchronous messaging api for GroupService to call back.
|