nl.west.aaa
Class TCPTransport
java.lang.Object
|
+--nl.west.aaa.TCPTransport
- public class TCPTransport
- extends java.lang.Object
- implements TransportProtocol
Constructor Summary |
TCPTransport(int listenPort,
int sendPort)
Initialize for transport over TCP. |
Method Summary |
void |
sendMessage(byte[] data,
Identifier id)
Send the message to the identifier. |
void |
startListening(AAAUnit receiver)
Listen for connections and pass them to the receiver
useing the handleIncoming() method of the Receiver. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
TCPTransport
public TCPTransport(int listenPort,
int sendPort)
- Initialize for transport over TCP.
listenPort is the port that is listened on,
sendPort is the port connections are made on.
sendMessage
public void sendMessage(byte[] data,
Identifier id)
throws java.io.IOException
- Description copied from interface: TransportProtocol
- Send the message to the identifier.
If an error has occured an IOException will be thrown.
No thrown exception may indicate that the transportprotocol
has handled the message correctly.
The signaling of receipt of the message
by the receiver (transport level acnoledgement)
is protocol dependant.
- Specified by:
- sendMessage in interface TransportProtocol
startListening
public void startListening(AAAUnit receiver)
- Listen for connections and pass them to the receiver
useing the handleIncoming() method of the Receiver.
- Specified by:
- startListening in interface TransportProtocol
|