public interface IWorldConnection<ADDRESS extends IWorldConnectionAddress> extends IWorldReaderProvider, IWorldWriterProvider
Simple methods that are needed to make connection read/write messages.
Implementor is required to implement the interface as reusable. Meaning that one instance of object may serve first as the connection to one server and then to another.
Control the object through IControllable interface.
Example scenario 1:
Or more advance scenario 2 (reconnection):
| Modifier and Type | Method and Description |
|---|---|
ADDRESS |
getAddress()
Get the descriptor of the connection's remote side.
|
void |
setAddress(ADDRESS address)
Sets the connection address to the object.
|
void |
setLogMessages(boolean logMessages)
Sets whether to log the messages that are sent/received through writer/reader.
|
getReadergetComponentIdgetWritervoid setLogMessages(boolean logMessages)
logMessages - ADDRESS getAddress()
void setAddress(ADDRESS address) throws CommunicationException
If the object is connected - it throws exception AlreadyConnectedException
address - CommunicationExceptionCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.