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.commonapi
Interface Application

All Known Implementing Classes:
  AggregationImpl, BandwidthMeasuringTLTest, GCPastImpl, GlacierImpl, LookupService, MultiringApplication, MultiringRegrTest.MultiringTestApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyApp, MyScribeClient, MyScribeClient, MySplitStreamClient, PastImpl, ReplicationImpl, ReplicationManagerImpl, RoutingTableTest.MyApp, ScribeImpl

    public interface Application

Version:
  $Id: Application.java 3613 2007-02-15 14:45:14Z jstewart $
Author:
  Alan Mislove, Peter Druschel

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.

Method Detail

### forward

    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.

  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

    void deliver(Id id,
                 Message message)

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

  Parameters:
    `id` - The destination id of the message
    `message` - The message being sent

### update

    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.

  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.