public abstract class ConnectionBase extends java.lang.Object implements IServerConnection
MONITOR_PORT, REMOTE_SERVER_IP, SERVER_IP, SERVER_PORT
Constructor and Description |
---|
ConnectionBase()
Default
|
Modifier and Type | Method and Description |
---|---|
void |
attach(IObserver<byte[]> newObserver)
Attaches a new observer to this connection
|
boolean |
isConnected() |
void |
stopReceiveLoop()
Stops the loop of receiving messages and notifying observers after
receiving the next message
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
establishConnection, sendMessage, startReceiveLoop
public void stopReceiveLoop()
stopReceiveLoop
in interface IServerConnection
public void attach(IObserver<byte[]> newObserver)
attach
in interface ISubscribe<byte[]>
newObserver
- the observer that is interested in new messagespublic boolean isConnected()
isConnected
in interface IServerConnection