Bees v0.5.0 API

apps.liveness
Class LivenessSession

java.lang.Object
  |
  +--bees.core.ProtocolSession
        |
        +--bees.core.ExtendedProtocolSession
              |
              +--apps.liveness.LivenessSession
All Implemented Interfaces:
ExternalCapsuleReceiver

public final class LivenessSession
extends ExtendedProtocolSession

The LivenessSession tracks information for the liveness protocol and manages communication with any interested applications.


Fields inherited from class bees.core.ExtendedProtocolSession
METHOD_ADD_NEIGHBOR, METHOD_ERROR, METHOD_NONE, METHOD_REGISTER, METHOD_REM_NEIGHBOR, METHOD_REPLY, METHOD_UNREGISTER, METHOD_USER, REGISTER_TIMEOUT
 
Fields inherited from class bees.core.ProtocolSession
neighbors
 
Constructor Summary
LivenessSession()
          Construct an empty LivenessSession.
 
Method Summary
 void attachNeighbor(Node node, Neighbor neighbor)
          Call back used to attach receivers for this protocol's Capsules.
 void detachNeighbor(Node node, Neighbor neighbor)
          Call back used to detach receivers for this protocol's Capsules.
 apps.liveness.LivenessParameters getLivenessParameters()
           
 MulticastNeighborhood getNeighborhood()
           
 void lostNeighbor(NeighborImpl ni)
          Notify the applications that the neighbor is unresponsive.
 void setLivenessParameters(apps.liveness.LivenessParameters lp)
           
 java.lang.String toString()
           
 void userReceive(Node node, int method, ExternalCapsule ec)
           
 
Methods inherited from class bees.core.ExtendedProtocolSession
addNeighbor, getInterests, getNeighbors, notifyInterests, receive, register, removeNeighbor, reply, reply, unregister
 
Methods inherited from class bees.core.ProtocolSession
addNeighbor, getByteArray, getCache, removeNeighbor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LivenessSession

public LivenessSession()
Construct an empty LivenessSession.
Method Detail

setLivenessParameters

public void setLivenessParameters(apps.liveness.LivenessParameters lp)
Parameters:
lp - The LivenessParameters to use for this protocol flow.

getLivenessParameters

public apps.liveness.LivenessParameters getLivenessParameters()
Returns:
The LivenessParameters to use for this protocol flow.

getNeighborhood

public MulticastNeighborhood getNeighborhood()
Returns:
The neighborhood to use when multicasting PokeCapsules.

lostNeighbor

public void lostNeighbor(NeighborImpl ni)
Notify the applications that the neighbor is unresponsive.
Parameters:
ni - The unresponsive neighbor.

attachNeighbor

public void attachNeighbor(Node node,
                           Neighbor neighbor)
Description copied from class: ProtocolSession
Call back used to attach receivers for this protocol's Capsules.
Overrides:
attachNeighbor in class ProtocolSession
See Also:
ProtocolSession.attachNeighbor(Node, Neighbor)

detachNeighbor

public void detachNeighbor(Node node,
                           Neighbor neighbor)
Description copied from class: ProtocolSession
Call back used to detach receivers for this protocol's Capsules.
Overrides:
detachNeighbor in class ProtocolSession
See Also:
ProtocolSession.detachNeighbor(Node, Neighbor)

userReceive

public void userReceive(Node node,
                        int method,
                        ExternalCapsule ec)
Overrides:
userReceive in class ExtendedProtocolSession
See Also:
ExtendedProtocolSession.userReceive(Node, int, ExternalCapsule)

toString

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

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/