public abstract class AbstractBlaubotConnection extends java.lang.Object implements IBlaubotConnection
IBlaubotConnection
implemeneting only the listener code.Modifier and Type | Field and Description |
---|---|
protected java.util.List<IBlaubotConnectionListener> |
connectionListeners |
Constructor and Description |
---|
AbstractBlaubotConnection() |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(IBlaubotConnectionListener listener)
Adds a connection listener to get informed if the connection gets closed.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
protected void |
notifyDisconnected()
Notifies all registered listeners that this connection is now disconnected
|
void |
removeConnectionListener(IBlaubotConnectionListener listener)
Removes a connection listener.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
disconnect, getRemoteDevice, isConnected, read, read, read, readFully, readFully, write, write, write
protected java.util.List<IBlaubotConnectionListener> connectionListeners
public void addConnectionListener(IBlaubotConnectionListener listener)
IBlaubotConnection
addConnectionListener
in interface IBlaubotConnection
listener
- the listener to addpublic void removeConnectionListener(IBlaubotConnectionListener listener)
IBlaubotConnection
removeConnectionListener
in interface IBlaubotConnection
listener
- the previoulsy attached listenerprotected void notifyDisconnected()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object