Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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>

Constructor Summary
`DefaultCallback(Environment environment)`
`DefaultCallback(Logger logger)`

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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultCallback

    public DefaultCallback(Environment environment)

### DefaultCallback

    public DefaultCallback(Logger logger)

Method Detail

### 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 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.