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
Interface TransportLayerCallback<Identifier,MessageType>

Type Parameters:
  `Identifier` -
  `MessageType` -

All Known Implementing Classes:
  BandwidthLimitingTransportLayer, CommonAPITransportLayerImpl, DefaultCallback, FirewallTLImpl, LimitSocketsTransportLayer, LivenessTransportLayerImpl, MagicNumberTransportLayer, MultiInetAddressTransportLayerImpl, PeerReviewImpl, PriorityTransportLayerImpl, RecordLayer, RendezvousTransportLayerImpl, 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.Object> 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.Object> 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`

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.