Rice Pastry API

org.mpisws.p2p.transport
Interface TransportLayerCallback<Identifier,MessageType>

Type Parameters:
Identifier -
MessageType -
All Known Implementing Classes:
CommonAPITransportLayerImpl, DefaultCallback, LivenessTransportLayerImpl, MagicNumberTransportLayer, MultiInetAddressTransportLayerImpl, PriorityTransportLayerImpl, SourceRouteManagerImpl, SourceRouteTransportLayerImpl, TLPastryNode

public interface TransportLayerCallback<Identifier,MessageType>

Used to receive incoming messages/sockets.

Author:
Jeff Hoye

Method Summary
 void incomingSocket(P2PSocket<Identifier> s)
          Notification of a new socket.
 void messageReceived(Identifier i, MessageType m, java.util.Map<java.lang.String,java.lang.Integer> options)
          Called when a new message is received.
 

Method Detail

messageReceived

void messageReceived(Identifier i,
                     MessageType m,
                     java.util.Map<java.lang.String,java.lang.Integer> options)
                     throws java.io.IOException
Called when a new message is received.

Parameters:
i - The node it is coming from
m - the message
options - describe how the message arrived (udp/tcp, encrypted etc)
Throws:
java.io.IOException - if there is a problem decoding the message

incomingSocket

void incomingSocket(P2PSocket<Identifier> s)
                    throws java.io.IOException
Notification of a new socket.

Parameters:
s - the incoming socket
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection