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

## rice.pastry.socket.nat.rendezvous
Class RendezvousApp

    java.lang.Object
      rice.pastry.client.PastryAppl
          rice.pastry.socket.nat.rendezvous.RendezvousApp

All Implemented Interfaces:
  RendezvousStrategy<RendezvousSocketNodeHandle>

    public class RendezvousApp

extends PastryAppl
implements RendezvousStrategy<RendezvousSocketNodeHandle>

TODO: make not abstract

Author:
  Jeff Hoye

Field Summary
`protected LeafSet` | `leafSet`
`protected SelectorManager` | `selectorManager`
`protected RendezvousTransportLayer<RendezvousSocketNodeHandle>` | `tl`

Fields inherited from class rice.pastry.client.PastryAppl
`address, deserializer, instance, logger, options, receiver, thePastryNode`

Fields inherited from interface org.mpisws.p2p.transport.rendezvous.RendezvousStrategy
`SUCCESS`

Constructor Summary
`RendezvousApp(PastryNode pn)`

Method Summary
`void` | `isNatted(NodeHandle bootstrap, Continuation<java.net.InetSocketAddress,java.lang.Exception> receiveResult)` Can be called before you boot, will tell you if you are Firewalled.
`void` | `messageForAppl(Message msg)` Called by pastry when a message arrives for this application.
`Cancellable` | `openChannel(RendezvousSocketNodeHandle target, RendezvousSocketNodeHandle rendezvous, RendezvousSocketNodeHandle source, int uid, Continuation<java.lang.Integer,java.lang.Exception> deliverAckToMe, 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).
`void` | `receiveMessage(Message msg)` If this is going to cause an infinite loop, just drop the message.
`MessageRequestHandle<RendezvousSocketNodeHandle,java.nio.ByteBuffer>` | `sendMessage(RendezvousSocketNodeHandle i, java.nio.ByteBuffer m, MessageCallback<RendezvousSocketNodeHandle,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<RendezvousSocketNodeHandle> tl)`
`java.lang.String` | `toString()`

Methods inherited from class rice.pastry.client.PastryAppl
`accept, canReceiveSocket, connect, deliverWhenNotReady, destroy, enrouteMessage, finishReceiveSocket, getAddress, getDeserializer, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, receiveMessageInternal, register, routeMsg, routeMsg, routeMsgDirect, routeSetChange, setDeserializer`

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

Field Detail

### leafSet

    protected LeafSet leafSet

### selectorManager

    protected SelectorManager selectorManager

### tl

    protected RendezvousTransportLayer<RendezvousSocketNodeHandle> tl

Constructor Detail

### RendezvousApp

    public RendezvousApp(PastryNode pn)

Method Detail

### isNatted

    public void isNatted(NodeHandle bootstrap,
                         Continuation<java.net.InetSocketAddress,java.lang.Exception> receiveResult)

  Can be called before you boot, will tell you if you are Firewalled. Should send a message to the bootstrap, who forwards it to another node who sends you the request back. Should try UDP/TCP. Returns your external address.

  Parameters:
    `bootstrap` -
    `receiveResult` -

### receiveMessage

    public void receiveMessage(Message msg)

  If this is going to cause an infinite loop, just drop the message. The infinite loop is caused when the next hop is the destination of the message, and is NATted. ... and we're not connected?

  Overrides:
    `receiveMessage` in class `PastryAppl`
  Parameters:
    `msg` - the message that is arriving.

### messageForAppl

    public void messageForAppl(Message msg)

  Description copied from class: `PastryAppl`
  Called by pastry when a message arrives for this application.

  Specified by:
    `messageForAppl` in class `PastryAppl`
  Parameters:
    `msg` - the message that is arriving.

### openChannel

    public Cancellable openChannel(RendezvousSocketNodeHandle target,
                                   RendezvousSocketNodeHandle rendezvous,
                                   RendezvousSocketNodeHandle source,
                                   int uid,
                                   Continuation<java.lang.Integer,java.lang.Exception> deliverAckToMe,
                                   java.util.Map<java.lang.String,java.lang.Object> options)

  Description copied from interface: `RendezvousStrategy`
  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).

  Specified by:
    `openChannel` in interface `RendezvousStrategy<RendezvousSocketNodeHandle>`
  Parameters:
    `target` - call ChannelOpener.openChannel() on this Identifier
    `rendezvous` - pass this to ChannelOpener.openChannel(), it's who the ChannelOpener will connect to
    `deliverAckToMe` - notify me when success/failure
  Returns:
    a way to cancel the request

### sendMessage

    public MessageRequestHandle<RendezvousSocketNodeHandle,java.nio.ByteBuffer> sendMessage(RendezvousSocketNodeHandle i,
                                                                                            java.nio.ByteBuffer m,
                                                                                            MessageCallback<RendezvousSocketNodeHandle,java.nio.ByteBuffer> deliverAckToMe,
                                                                                            java.util.Map<java.lang.String,java.lang.Object> options)

  Description copied from interface: `RendezvousStrategy`
  Sends the message via an out-of-band channel. Usually routing.

  Specified by:
    `sendMessage` in interface `RendezvousStrategy<RendezvousSocketNodeHandle>`
  Returns:

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### setTransportLayer

    public void setTransportLayer(RendezvousTransportLayer<RendezvousSocketNodeHandle> tl)

  Specified by:
    `setTransportLayer` in interface `RendezvousStrategy<RendezvousSocketNodeHandle>`

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.