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.standard
Class StandardJoinProtocol

    java.lang.Object
      rice.pastry.client.PastryAppl
          rice.pastry.standard.StandardJoinProtocol

All Implemented Interfaces:
  java.util.Observer

Direct Known Subclasses:
  ConsistentJoinProtocol

    public class StandardJoinProtocol

extends PastryAppl

An implementation of a simple join protocol.

Version:
  $Id: StandardJoinProtocol.java 3413 2006-10-04 13:15:18Z jeffh $
Author:
  Peter Druschel, Andrew Ladd, Rongmei Zhang, Y. Charlie Hu

Field Summary
`protected LeafSet` | `leafSet` DESCRIBE THE FIELD
`protected NodeHandle` | `localHandle` DESCRIBE THE FIELD
`protected RoutingTable` | `routeTable` DESCRIBE THE FIELD

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

Constructor Summary
`StandardJoinProtocol(PastryNode ln, NodeHandle lh, RoutingTable rt, LeafSet ls)` Constructor.
`StandardJoinProtocol(PastryNode ln, NodeHandle lh, RoutingTable rt, LeafSet ls, MessageDeserializer md)` Constructor for StandardJoinProtocol.

Method Summary
`void` | `broadcastRows(JoinRequest jr)` Broadcasts the route table rows.
`boolean` | `deliverWhenNotReady()` We always want to receive messages.
`int` | `getAddress()` Get address.
`void` | `messageForAppl(Message msg)` Should not be called becasue we are overriding the receiveMessage() interface anyway.
`void` | `receiveMessage(Message msg)` Receives a message from the outside world.
`protected void` | `setReady()` Can be overloaded to do additional things before going ready.

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

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

Field Detail

### localHandle

    protected NodeHandle localHandle

  DESCRIBE THE FIELD

### routeTable

    protected RoutingTable routeTable

  DESCRIBE THE FIELD

### leafSet

    protected LeafSet leafSet

  DESCRIBE THE FIELD

Constructor Detail

### StandardJoinProtocol

    public StandardJoinProtocol(PastryNode ln,
                                NodeHandle lh,
                                RoutingTable rt,
                                LeafSet ls)

  Constructor.

  Parameters:
    `ln` - DESCRIBE THE PARAMETER
    `lh` - the local node handle.
    `rt` - DESCRIBE THE PARAMETER
    `ls` - DESCRIBE THE PARAMETER

### StandardJoinProtocol

    public StandardJoinProtocol(PastryNode ln,
                                NodeHandle lh,
                                RoutingTable rt,
                                LeafSet ls,
                                MessageDeserializer md)

  Constructor for StandardJoinProtocol.

  Parameters:
    `ln` - DESCRIBE THE PARAMETER
    `lh` - DESCRIBE THE PARAMETER
    `rt` - DESCRIBE THE PARAMETER
    `ls` - DESCRIBE THE PARAMETER
    `md` - DESCRIBE THE PARAMETER

Method Detail

### getAddress

    public int getAddress()

  Get address.

  Overrides:
    `getAddress` in class `PastryAppl`
  Returns:
    gets the address.

### setReady

    protected void setReady()

  Can be overloaded to do additional things before going ready. For example, verifying that other nodes are aware of us, so that consistent routing is guaranteed.

### receiveMessage

    public void receiveMessage(Message msg)

  Receives a message from the outside world.

  Overrides:
    `receiveMessage` in class `PastryAppl`
  Parameters:
    `msg` - the message that was received.

### broadcastRows

    public void broadcastRows(JoinRequest jr)

  Broadcasts the route table rows.

  Parameters:
    `jr` - the join row.

### messageForAppl

    public void messageForAppl(Message msg)

  Should not be called becasue we are overriding the receiveMessage() interface anyway.

  Specified by:
    `messageForAppl` in class `PastryAppl`
  Parameters:
    `msg` - DESCRIBE THE PARAMETER

### deliverWhenNotReady

    public boolean deliverWhenNotReady()

  We always want to receive messages.

  Overrides:
    `deliverWhenNotReady` in class `PastryAppl`
  Returns:
    DESCRIBE THE RETURN VALUE

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.