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 RendezvousJoinProtocol

    java.lang.Object
      rice.pastry.client.PastryAppl
          rice.pastry.standard.StandardJoinProtocol
              rice.pastry.standard.ConsistentJoinProtocol
                  rice.pastry.socket.nat.rendezvous.RendezvousJoinProtocol

All Implemented Interfaces:
  java.util.Observer, JoinProtocol, NodeSetListener, LoopObserver

    public class RendezvousJoinProtocol

extends ConsistentJoinProtocol

The purpose of this class is to allow a NATted node to boot. Without this class, when the JoinRequest reaches the nearest neighbor of the joiner, that node can't deliver the Request back to the joiner (because he is NATted). The class opens a pilot to the bootstrap, then includes this node in the RendezvousJoinRequest. Note that this class uses both JoinRequests and RendezvousJoinRequests. The latter are only used for a NATted Joiner. Overview: Extend CJPSerializer to also use RendezvousJoinRequest (include the bootstrap, and possibly additional credentials) pass in constructor Override handleInitiateJoin(): If local node is NATted: open a pilot to the bootstrap (make sure to complete this before continuing) send the RendezvousJoinRequest else super.handleInitiateJoin() TODO: Override respondToJoiner(): If joiner is NATted: use the pilot on the bootstrap: rendezvousLayer.requestSocket(joiner, bootstrap) Override completeJoin() to close the pilot to the bootstrap before calling super.completeJoin() because that will cause pilots to open. may need a way to verify that it is closed, or else don't close it if it's in the leafset, b/c it may become busted

Author:
  Jeff Hoye

Nested Class Summary

Nested classes/interfaces inherited from class rice.pastry.standard.ConsistentJoinProtocol
`ConsistentJoinProtocol.CJPDeserializer`

Nested classes/interfaces inherited from class rice.pastry.standard.StandardJoinProtocol
`StandardJoinProtocol.SJPDeserializer`

Field Summary

Fields inherited from class rice.pastry.standard.ConsistentJoinProtocol
`MAX_NUM_TO_HEAR_FROM, MAX_TIME_TO_BE_SCHEDULED, RETRY_INTERVAL, tryingToGoReady`

Fields inherited from class rice.pastry.standard.StandardJoinProtocol
`joinEvent, leafSet, localHandle, routeTable`

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

Constructor Summary
`RendezvousJoinProtocol(PastryNode ln, NodeHandle lh, RoutingTable rt, LeafSet ls, ReadyStrategy nextReadyStrategy, PilotManager<RendezvousSocketNodeHandle> pilotManager)`

Method Summary
`protected void` | `getJoinRequest(NodeHandle b, Continuation<JoinRequest,java.lang.Exception> deliverJRToMe)` Use RendezvousJoinRequest if local node is NATted
`protected java.util.Map<java.lang.String,java.lang.Object>` | `getOptions(JoinRequest jr, java.util.Map<java.lang.String,java.lang.Object> existing)` This is called from respondToJoiner() and other places, we need to set the OPTION_USE_PILOT to the intermediate node, so that will queue the RendezvousTL to use the pilot.

Methods inherited from class rice.pastry.standard.ConsistentJoinProtocol
`addToLeafSet, delayInterest, destroy, loopTime, nodeSetUpdate, otherNodesMaySuspectFaulty, receiveMessage, requestFromEveryoneWeHaventHeardFrom, sendTheMessage, setReady, update, whoDoWeNeedAResponseFrom`

Methods inherited from class rice.pastry.standard.StandardJoinProtocol
`broadcastRows, completeJoin, deliverWhenNotReady, getAddress, handleInitiateJoin, handleIntermediateHop, handleJoinRequest, initiateJoin, messageForAppl, respondToJoiner`

Methods inherited from class rice.pastry.client.PastryAppl
`accept, canReceiveSocket, connect, enrouteMessage, finishReceiveSocket, 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, toString, wait, wait, wait`

Constructor Detail

### RendezvousJoinProtocol

    public RendezvousJoinProtocol(PastryNode ln,
                                  NodeHandle lh,
                                  RoutingTable rt,
                                  LeafSet ls,
                                  ReadyStrategy nextReadyStrategy,
                                  PilotManager<RendezvousSocketNodeHandle> pilotManager)

Method Detail

### getJoinRequest

    protected void getJoinRequest(NodeHandle b,
                                  Continuation<JoinRequest,java.lang.Exception> deliverJRToMe)

  Use RendezvousJoinRequest if local node is NATted

  Overrides:
    `getJoinRequest` in class `StandardJoinProtocol`

### getOptions

    protected java.util.Map<java.lang.String,java.lang.Object> getOptions(JoinRequest jr,
                                                                          java.util.Map<java.lang.String,java.lang.Object> existing)

  This is called from respondToJoiner() and other places, we need to set the OPTION_USE_PILOT to the intermediate node, so that will queue the RendezvousTL to use the pilot.

  Overrides:
    `getOptions` in class `StandardJoinProtocol`

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.