Rice Pastry API

org.mpisws.p2p.transport.rendezvous
Interface RendezvousStrategy<Identifier>

All Known Implementing Classes:
RendezvousApp

public interface RendezvousStrategy<Identifier>

Uses a 3rd party channel to request a node to connect to a dest.

Author:
Jeff Hoye

Field Summary
static int SUCCESS
           
 
Method Summary
 Cancellable openChannel(Identifier target, Identifier rendezvous, Identifier source, int uid, Continuation<java.lang.Integer,java.lang.Exception> deliverResultToMe, java.util.Map<java.lang.String,java.lang.Object> options)
          Calls ChannelOpener.openChannel(dest, credentials) on target Possible exceptions to deliverResultToMe: NodeIsFaultyException if target is faulty UnableToConnectException if dest is faulty Called by: 1) Rendezvous if the target and source are NATted 2) Source if target is NATted, but source isn't Not called if the pilotFinder found a pilot for the target (in FreePastry this means that this will not be called if the target is in the leafSet).
 MessageRequestHandle<Identifier,java.nio.ByteBuffer> sendMessage(Identifier i, java.nio.ByteBuffer m, MessageCallback<Identifier,java.nio.ByteBuffer> deliverAckToMe, java.util.Map<java.lang.String,java.lang.Object> options)
          Sends the message via an out-of-band channel.
 void setTransportLayer(RendezvousTransportLayer<Identifier> ret)
           
 

Field Detail

SUCCESS

static final int SUCCESS
See Also:
Constant Field Values
Method Detail

openChannel

Cancellable openChannel(Identifier target,
                        Identifier rendezvous,
                        Identifier source,
                        int uid,
                        Continuation<java.lang.Integer,java.lang.Exception> deliverResultToMe,
                        java.util.Map<java.lang.String,java.lang.Object> options)
Calls ChannelOpener.openChannel(dest, credentials) on target Possible exceptions to deliverResultToMe: NodeIsFaultyException if target is faulty UnableToConnectException if dest is faulty Called by: 1) Rendezvous if the target and source are NATted 2) Source if target is NATted, but source isn't Not called if the pilotFinder found a pilot for the target (in FreePastry this means that this will not be called if the target is in the leafSet).

Parameters:
target - call ChannelOpener.openChannel() on this Identifier
rendezvous - pass this to ChannelOpener.openChannel(), it's who the ChannelOpener will connect to
credentials - this is also passed to ChannelOpener.openChannel()
deliverResultToMe - notify me when success/failure
Returns:
a way to cancel the request

sendMessage

MessageRequestHandle<Identifier,java.nio.ByteBuffer> sendMessage(Identifier i,
                                                                 java.nio.ByteBuffer m,
                                                                 MessageCallback<Identifier,java.nio.ByteBuffer> deliverAckToMe,
                                                                 java.util.Map<java.lang.String,java.lang.Object> options)
Sends the message via an out-of-band channel. Usually routing.

Parameters:
i -
m -
deliverAckToMe -
options -
Returns:

setTransportLayer

void setTransportLayer(RendezvousTransportLayer<Identifier> ret)

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection