public class ServerConnectionManager.BlaubotServerRelayConnection extends BlaubotConnectionQueueMock implements IBlaubotAdminMessageListener
connected, disconnnectMonitor, inputQueue, outputQueueconnectionListeners| Constructor and Description |
|---|
BlaubotServerRelayConnection(java.lang.String mediatorUniqueDeviceId,
java.lang.String recipientUniqueDeviceId)
Note: starts a thread!
|
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect()
Disconnects the connection (if connected), nothing otherwise
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getMediatorUniqueDeviceId() |
java.lang.String |
getRecipientUniqueDeviceId() |
int |
hashCode() |
protected void |
notifyDisconnected()
Notifies all registered listeners that this connection is now disconnected
|
void |
onAdminMessage(AbstractAdminMessage adminMessage)
Called when an admin message was received
|
java.lang.String |
toString() |
getInputStreamForWrittenConnectionData, getOtherEndpointConnection, getRemoteDevice, isConnected, read, read, read, readFully, readFully, write, write, write, writeMockDataToInputStreamaddConnectionListener, removeConnectionListenerpublic BlaubotServerRelayConnection(java.lang.String mediatorUniqueDeviceId,
java.lang.String recipientUniqueDeviceId)
mediatorUniqueDeviceId - the uniqueDeviceId to which the data should be send (via relay message) when using the write(*) methods.recipientUniqueDeviceId - the recipient's unique device id (Server/King)public void onAdminMessage(AbstractAdminMessage adminMessage)
IBlaubotAdminMessageListeneronAdminMessage in interface IBlaubotAdminMessageListeneradminMessage - the received admin messageprotected void notifyDisconnected()
AbstractBlaubotConnectionnotifyDisconnected in class AbstractBlaubotConnectionpublic void disconnect()
IBlaubotConnectiondisconnect in interface IBlaubotConnectiondisconnect in class BlaubotConnectionQueueMockpublic boolean equals(java.lang.Object o)
equals in class BlaubotConnectionQueueMockpublic int hashCode()
hashCode in class BlaubotConnectionQueueMockpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getMediatorUniqueDeviceId()
public java.lang.String getRecipientUniqueDeviceId()