nl.west.aaa
Interface TransportProtocol

All Known Implementing Classes:
UDPTransport, TCPTransport, RadiusTransport

public interface TransportProtocol

Classes implementing this interface can send and receive messages. The transportprotocol should be listening to incoming connections when specified to do so. This is protocol and implementation dependant.

See Also:
Identifier

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 AAAUnit useing the handleIncoming() method of the AAAUnit.
 

Method Detail

sendMessage

public void sendMessage(byte[] data,
                        Identifier id)
                 throws java.io.IOException
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.

startListening

public void startListening(AAAUnit receiver)
Listen for connections and pass them to the AAAUnit useing the handleIncoming() method of the AAAUnit. If a receiver was specified earlier, this value overwrites the old value and no more incoming messages should be sent to the orriginal receiver. If the given receiver is null no more incoming messages should be passed to the receiver.



Arthur <arthur@ch.twi.tudelft.nl> http://ch.twi.tudelft.nl/~arthur/
2002-05-27