ist.palcom.connections
Class UnicastConnection
java.lang.Object
ist.palcom.connections.Connection
ist.palcom.connections.UnicastConnection
- All Implemented Interfaces:
- IHgraphNode
public class UnicastConnection
- extends Connection
A connection for the transport of unicast messages. It reads messages, and passes
them to registered message receivers.
| Fields inherited from interface ist.palcom.hgraph.IHgraphNode |
CHILD_NAME_CLASH, CIRCULARITY_CLASH, COMMAND_OR_NODE_MISSING, ERROR, HANDLER_MISSING, INVOKATOR_MISSING, LISTENER_MISSING, NODE_NOT_CHILD, PATH_MISSING, SIBLING_ALREADY_EXISTS, SIBLING_NONEXISTENT, SIBLING_REFERENCE_ALREADY_EXISTS, SIBLING_REFERENCE_NONEXISTENT, STATUS_OK, VALUE_ALREADY_EXISTS, VALUE_NOT_PRESENT |
| Methods inherited from class ist.palcom.connections.Connection |
addMessageReceiver, addNodeChild, fireMessage, getChildIterator, getFuncFunc, getNodeName, getNodeParent, getPath, getSiblingFunc, getValueFunc, hasChildNamed, isAncestorOf, removeMessageReceiver, removeNodeChild, setNodeName, setNodeParent, toXML, toXMLFull, toXMLFullRecursively, toXMLRecursively, updatePath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnicastConnection
protected UnicastConnection(CommunicationManager communicationManager,
DeviceID remoteDeviceID,
ConnectionsXMLFactory factory)
getRemoteDeviceID
public DeviceID getRemoteDeviceID()
- Returns:
- The device ID of the remote party.
setLocalSelector
protected void setLocalSelector(Selector localSelector)
setRemoteSelector
protected void setRemoteSelector(Selector remoteSelector)
setRemoteLocalSID
public void setRemoteLocalSID(java.lang.String remoteLocalSID)
getLocalSelector
public Selector getLocalSelector()
getRemoteSelector
public Selector getRemoteSelector()
getRemoteLocalSID
public LocalSID getRemoteLocalSID()
close
public void close()
sendMessage
public void sendMessage(Message message)
- Specified by:
sendMessage in class Connection
addDisconnectReceiver
public void addDisconnectReceiver(PalcomThread listener)
- Add a PalcomThread that will be notified when the connection is
disconnected. A ConnectionEvent with connected=false will be sent to the
receiver.
removeDisconnectReceiver
public void removeDisconnectReceiver(PalcomThread listener)
fireDisconnected
protected void fireDisconnected()
- Notifies all listeners that have registered interest for notification on
disconnects.