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.join
Class JoinRequest

    java.lang.Object
      rice.pastry.messaging.Message
          rice.pastry.messaging.PRawMessage
              rice.pastry.join.JoinRequest

All Implemented Interfaces:
  java.io.Serializable, Message, RawMessage

Direct Known Subclasses:
  RendezvousJoinRequest

    public class JoinRequest

extends PRawMessage

Request to join this network.

Version:
  $Id: JoinRequest.java 4062 2007-12-26 12:35:03Z jeffh $
Author:
  Jeff Hoye, Andrew Ladd
See Also:
  Serialized Form

Field Summary
`protected NodeHandle` | `handle`
`static byte` | `HAS_HANDLE`
`static byte` | `HAS_JOIN_HANDLE`
`static byte` | `HAS_LEAFSET`
`protected NodeHandle` | `joinHandle`
`protected long` | `timestamp`
`static short` | `TYPE`

Fields inherited from class rice.pastry.messaging.Message
`DEFAULT_PRIORITY_LEVEL`

Fields inherited from interface rice.p2p.commonapi.Message
`DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, LOWEST_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY`

Constructor Summary
`JoinRequest(InputBuffer buf, NodeHandleFactory nhf, NodeHandle sender, PastryNode localNode)`
`JoinRequest(NodeHandle nh, byte rtBaseBitLength)` Constructor.
`JoinRequest(NodeHandle nh, byte rtBaseBitLength, long timestamp)`
`JoinRequest(NodeHandle nh, java.util.Date stamp, byte rtBaseBitLength)` Constructor.

Method Summary
`boolean` | `accepted()` Returns true if the request was accepted, false if it hasn't yet.
`void` | `acceptJoin(NodeHandle nh, LeafSet ls)` Accept join request.
`NodeHandle` | `getHandle()` Gets the handle of the node trying to join.
`NodeHandle` | `getJoinHandle()` Gets the handle of the node that accepted the join request;
`LeafSet` | `getLeafSet()` Gets the leafset of the node that accepted the join request;
`RouteSet[]` | `getRow(int i)` Get row.
`short` | `getType()` Raw Serialization
`int` | `lastRow()` Returns the number of rows left to determine (in order).
`int` | `numRows()` Get the number of rows.
`void` | `pushRow(RouteSet[] row)` Push row.
`void` | `serialize(OutputBuffer buf)`
`java.lang.String` | `toString()`

Methods inherited from class rice.pastry.messaging.Message
`getDate, getDestination, getPriority, getSender, getSenderId, setPriority, setSender, stamp`

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

Methods inherited from interface rice.p2p.commonapi.Message
`getPriority`

Field Detail

### HAS_HANDLE

    public static final byte HAS_HANDLE

See Also:
  Constant Field Values

### HAS_JOIN_HANDLE

    public static final byte HAS_JOIN_HANDLE

See Also:
  Constant Field Values

### HAS_LEAFSET

    public static final byte HAS_LEAFSET

See Also:
  Constant Field Values

### TYPE

    public static final short TYPE

See Also:
  Constant Field Values

### handle

    protected NodeHandle handle

### joinHandle

    protected NodeHandle joinHandle

### timestamp

    protected long timestamp

Constructor Detail

### JoinRequest

    public JoinRequest(NodeHandle nh,
                       byte rtBaseBitLength)

  Constructor.

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

### JoinRequest

    public JoinRequest(NodeHandle nh,
                       byte rtBaseBitLength,
                       long timestamp)

### JoinRequest

    public JoinRequest(NodeHandle nh,
                       java.util.Date stamp,
                       byte rtBaseBitLength)

  Constructor.

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

### JoinRequest

    public JoinRequest(InputBuffer buf,
                       NodeHandleFactory nhf,
                       NodeHandle sender,
                       PastryNode localNode)
                throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### getHandle

    public NodeHandle getHandle()

  Gets the handle of the node trying to join.

  Returns:
    the handle.

### getJoinHandle

    public NodeHandle getJoinHandle()

  Gets the handle of the node that accepted the join request;

  Returns:
    the handle.

### getLeafSet

    public 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(NodeHandle nh,
                           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(RouteSet[] row)

  Push row.

  Parameters:
    `row` - the row to push.

### getRow

    public 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`

### getType

    public short getType()

  Raw Serialization

### serialize

    public void serialize(OutputBuffer buf)
                   throws java.io.IOException

  Throws:
    `java.io.IOException`

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.