org.mpisws.p2p.transport.util
Class DefaultCallback<Identifier,MessageType>
java.lang.Object
org.mpisws.p2p.transport.util.DefaultCallback<Identifier,MessageType>
- All Implemented Interfaces:
- TransportLayerCallback<Identifier,MessageType>
public class DefaultCallback<Identifier,MessageType>
- extends java.lang.Object
- implements TransportLayerCallback<Identifier,MessageType>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCallback
public DefaultCallback(Environment environment)
DefaultCallback
public DefaultCallback(Logger logger)
incomingSocket
public void incomingSocket(P2PSocket s)
throws java.io.IOException
- Description copied from interface:
TransportLayerCallback
- Notification of a new socket.
- Specified by:
incomingSocket
in interface TransportLayerCallback<Identifier,MessageType>
- Parameters:
s
- the incoming socket
- Throws:
java.io.IOException
livenessChanged
public void livenessChanged(Identifier i,
int state)
messageReceived
public void messageReceived(Identifier i,
MessageType m,
java.util.Map<java.lang.String,java.lang.Object> options)
throws java.io.IOException
- Description copied from interface:
TransportLayerCallback
- Called when a new message is received.
- Specified by:
messageReceived
in interface TransportLayerCallback<Identifier,MessageType>
- Parameters:
i
- The node it is coming fromm
- the messageoptions
- describe how the message arrived (udp/tcp, encrypted etc)
- Throws:
java.io.IOException
- if there is a problem decoding the message
Copyright © 2001-2005 - Rice Pastry.