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:
  MessageReceiver

Direct Known Subclasses:
  ConsistentJoinProtocol

public class StandardJoinProtocol
extends PastryAppl

An implementation of a simple join protocol.

Version:
  $Id: StandardJoinProtocol.java 2808 2005-11-22 14:38:49Z jeffh $
Author:
  Peter Druschel, Andrew Ladd, Rongmei Zhang, Y. Charlie Hu

Field Summary
`protected Credentials` | `cred` DESCRIBE THE FIELD
`protected LeafSet` | `leafSet` DESCRIBE THE FIELD
`protected NodeHandle` | `localHandle` DESCRIBE THE FIELD
`protected RoutingTable` | `routeTable` DESCRIBE THE FIELD
`protected PastrySecurityManager` | `security` DESCRIBE THE FIELD

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

Constructor Summary
`StandardJoinProtocol(PastryNode ln, NodeHandle lh, PastrySecurityManager sm, RoutingTable rt, LeafSet ls)` Constructor.

Method Summary
`void` | `broadcastRows(JoinRequest jr)` Broadcasts the route table rows.
`boolean` | `deliverWhenNotReady()` We always want to receive messages.
`Address` | `getAddress()` Get address.
`Credentials` | `getCredentials()` Gets the Credentials attribute of the StandardJoinProtocol object
`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
`destroy, enrouteMessage, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, registerReceiver, routeMsg, routeMsgDirect, routeSetChange, sendMessage`

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

### security

    protected PastrySecurityManager security

  DESCRIBE THE FIELD

### routeTable

    protected RoutingTable routeTable

  DESCRIBE THE FIELD

### leafSet

    protected LeafSet leafSet

  DESCRIBE THE FIELD

### cred

    protected Credentials cred

  DESCRIBE THE FIELD

Constructor Detail

### StandardJoinProtocol

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

  Constructor.

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

Method Detail

### getAddress

    public Address getAddress()

  Get address.

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

### getCredentials

    public Credentials getCredentials()

  Gets the Credentials attribute of the StandardJoinProtocol object

  Specified by:
    `getCredentials` in class `PastryAppl`
  Returns:
    The Credentials value

### 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.

  Specified by:
    `receiveMessage` in interface `MessageReceiver`
  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.