Rice Pastry API

rice.pastry.join
Class JoinRequest

java.lang.Object
  |
  +--rice.pastry.messaging.Message
        |
        +--rice.pastry.join.JoinRequest
All Implemented Interfaces:
java.io.Serializable

public class JoinRequest
extends Message
implements java.io.Serializable

Request to join this network.

Version:
$Id: JoinRequest.java,v 1.6 2003/07/21 19:45:46 druschel Exp $
Author:
Andrew Ladd
See Also:
Serialized Form

Constructor Summary
JoinRequest(rice.pastry.NodeHandle nh)
          Constructor.
JoinRequest(rice.pastry.NodeHandle nh, rice.pastry.security.Credentials cred)
          Constructor.
JoinRequest(rice.pastry.NodeHandle nh, rice.pastry.security.Credentials cred, java.util.Date stamp)
          Constructor.
JoinRequest(rice.pastry.NodeHandle nh, java.util.Date stamp)
          Constructor.
 
Method Summary
 boolean accepted()
          Returns true if the request was accepted, false if it hasn't yet.
 void acceptJoin(rice.pastry.NodeHandle nh, rice.pastry.leafset.LeafSet ls)
          Accept join request.
 rice.pastry.NodeHandle getHandle()
          Gets the handle of the node trying to join.
 rice.pastry.NodeHandle getJoinHandle()
          Gets the handle of the node that accepted the join request;
 rice.pastry.leafset.LeafSet getLeafSet()
          Gets the leafset of the node that accepted the join request;
 rice.pastry.routing.RouteSet[] getRow(int i)
          Get row.
 int lastRow()
          Returns the number of rows left to determine (in order).
 int numRows()
          Get the number of rows.
 void pushRow(rice.pastry.routing.RouteSet[] row)
          Push row.
 java.lang.String toString()
           
 
Methods inherited from class rice.pastry.messaging.Message
getCredentials, getDate, getDestination, getSenderId, getStream, hasPriority, setPriority, setSenderId, stamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoinRequest

public JoinRequest(rice.pastry.NodeHandle nh)
Constructor.

Parameters:
nh - a handle of the node trying to join the network.

JoinRequest

public JoinRequest(rice.pastry.NodeHandle nh,
                   java.util.Date stamp)
Constructor.

Parameters:
nh - a handle of the node trying to join the network.
stamp - the timestamp

JoinRequest

public JoinRequest(rice.pastry.NodeHandle nh,
                   rice.pastry.security.Credentials cred)
Constructor.

Parameters:
nh - a handle of the node trying to join the network.
cred - the credentials

JoinRequest

public JoinRequest(rice.pastry.NodeHandle nh,
                   rice.pastry.security.Credentials cred,
                   java.util.Date stamp)
Constructor.

Parameters:
nh - a handle of the node trying to join the network.
cred - the credentials
stamp - the timestamp
Method Detail

getHandle

public rice.pastry.NodeHandle getHandle()
Gets the handle of the node trying to join.

Returns:
the handle.

getJoinHandle

public rice.pastry.NodeHandle getJoinHandle()
Gets the handle of the node that accepted the join request;

Returns:
the handle.

getLeafSet

public rice.pastry.leafset.LeafSet getLeafSet()
Gets the leafset of the node that accepted the join request;

Returns:
the leafset.

accepted

public boolean accepted()
Returns true if the request was accepted, false if it hasn't yet.


acceptJoin

public void acceptJoin(rice.pastry.NodeHandle nh,
                       rice.pastry.leafset.LeafSet ls)
Accept join request.

Parameters:
nh - the node handle that accepts the join request.

lastRow

public int lastRow()
Returns the number of rows left to determine (in order).

Returns:
the number of rows left.

pushRow

public void pushRow(rice.pastry.routing.RouteSet[] row)
Push row.

Parameters:
row - the row to push.

getRow

public rice.pastry.routing.RouteSet[] getRow(int i)
Get row.

Parameters:
i - the row to get.
Returns:
the row.

numRows

public int numRows()
Get the number of rows.

Returns:
the number of rows.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection