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 Subinterfaces:
  IdentityTransportCallback<Handle,Identifier>, PeerReview<Handle,Identifier>, PeerReviewCallback<Handle,Identifier>, SSLTransportLayer<Identifier,MessageType>

All Known Implementing Classes:
  AggressiveLivenessTransportLayerImpl, BandwidthLimitingTransportLayer, BandwidthMeasuringTransportLayer, CommonAPITransportLayerImpl, DefaultCallback, FirewallTLImpl, IdentityTransportLayerImpl, LimitSocketsTransportLayer, LivenessTransportLayerImpl, MagicNumberTransportLayer, MultiInetAddressTransportLayerImpl, NetworkInfoTransportLayer, PastryNode, PeerReviewCallbackImpl, PeerReviewImpl, PriorityTransportLayerImpl, RC4TransportLayer, RecordLayer, RendezvousTransportLayerImpl, SimpleIdentityTransportLayer, SourceRouteManagerImpl, SourceRouteTransportLayerImpl, SSLTransportLayerImpl, TableTransprotLayerImpl

    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.