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.p2p.multiring
Class MultiringApplication

    java.lang.Object
      rice.p2p.multiring.MultiringApplication

All Implemented Interfaces:
  Application

public class MultiringApplication
extends java.lang.Object
implements Application

Version:
  $Id: MultiringApplication.java,v 1.3 2005/03/11 00:58:01 jeffh Exp $
Author:
  Alan Mislove, Peter Druschel

Field Summary
`protected Application` | `application` The app which this mulitring app is wrapping
`protected Id` | `ringId` The Id which represents the current ring this app is a member of

Constructor Summary
`protected` | `MultiringApplication(Id ringId, Application application)` Constructor

Method Summary
`void` | `deliver(Id id, Message message)` This method is called on the application at the destination node for the given id.
`boolean` | `forward(RouteMessage message)` This method is invoked on applications when the underlying node is about to forward the given message with the provided target to the specified next hop.
`void` | `update(NodeHandle handle, boolean joined)` This method is invoked to inform the application that the given node has either joined or left the neighbor set of the local node, as the set would be returned by the neighborSet call.

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

Field Detail

### application

    protected Application application

  The app which this mulitring app is wrapping

### ringId

    protected Id ringId

  The Id which represents the current ring this app is a member of

Constructor Detail

### MultiringApplication

    protected MultiringApplication(Id ringId,
                                   Application application)

  Constructor

Parameters:
  `ringId` - DESCRIBE THE PARAMETER
  `application` - DESCRIBE THE PARAMETER

Method Detail

### forward

    public boolean forward(RouteMessage message)

  This method is invoked on applications when the underlying node is about to forward the given message with the provided target to the specified next hop. Applications can change the contents of the message, specify a different nextHop (through re-routing), or completely terminate the message.

  Specified by:
    `forward` in interface `Application`
  Parameters:
    `message` - The message being sent, containing an internal message along with a destination key and nodeHandle next hop.
  Returns:
    Whether or not to forward the message further

### deliver

    public void deliver(Id id,
                        Message message)

  This method is called on the application at the destination node for the given id.

  Specified by:
    `deliver` in interface `Application`
  Parameters:
    `id` - The destination id of the message
    `message` - The message being sent

### update

    public void update(NodeHandle handle,
                       boolean joined)

  This method is invoked to inform the application that the given node has either joined or left the neighbor set of the local node, as the set would be returned by the neighborSet call.

  Specified by:
    `update` in interface `Application`
  Parameters:
    `handle` - The handle that has joined/left
    `joined` - Whether the node has joined or left

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.