Bees v0.5.0 API

bees.core
Class ExtendedProtocolPresentation

java.lang.Object
  |
  +--bees.core.ProtocolPresentation
        |
        +--bees.core.ExtendedProtocolPresentation
All Implemented Interfaces:
ExternalCapsuleReceiver, ExternalChannel
Direct Known Subclasses:
DiscoveryProtocolPresentation, DLProtocolPresentation, IDTranslatorPresentation, LivenessPresentation, UnknownProtocolPresentation

public abstract class ExtendedProtocolPresentation
extends ProtocolPresentation

An ExtendedProtocolPresentation is a ProtocolPresentation that provides functionality for interacting with a protocol that uses the ExtendedProtocolSession class.


Field Summary
protected  int state
           
static int STATE_COMPLETE
           
static int STATE_CONNECTED
           
static int STATE_ERROR
           
static int STATE_ERROR_TIMEOUT
           
static int STATE_NEWBORN
           
static int STATE_REGISTERED
           
static int STATE_USER
           
 
Constructor Summary
ExtendedProtocolPresentation()
          Construct an empty ExtendedProtocolPresentation.
 
Method Summary
 void addNeighbor(NeighborImpl ni)
           
 void addNeighborReply(Node node, CapabilityReference cr)
           
protected  long allocateMessageID(ExternalCapsule ec)
           
 void drop()
           
 int getState()
           
protected  ExternalCapsule lookupMessage(long id)
           
 void receive(Node node, ExternalCapsule ec)
          Call back used to handle a newly received ExternalCapsule.
 void register()
           
 void registerReply(Node node, ExternalCapsule ec)
           
protected  void releaseMessageID(long id)
           
 void remNeighbor(NeighborImpl ni)
           
 void remNeighborReply(Node node, CapabilityReference cr)
           
 void sendCapsule(ExternalCapsule ec)
          Send an ExternalCapsule to the other end of this channel.
protected  void setState(int newState)
           
 java.lang.String toString()
           
 void unregister()
           
 void unregisterReply(Node node, ExternalCapsule ec)
           
protected  void userReceive(Node node, int method, ExternalCapsule ec)
           
 int waitForState(int nextState, long timeout)
           
 
Methods inherited from class bees.core.ProtocolPresentation
disconnected, getLocal, recycleCapsule, revoke, revokePermissions, setLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_ERROR_TIMEOUT

public static final int STATE_ERROR_TIMEOUT

STATE_ERROR

public static final int STATE_ERROR

STATE_NEWBORN

public static final int STATE_NEWBORN

STATE_CONNECTED

public static final int STATE_CONNECTED

STATE_REGISTERED

public static final int STATE_REGISTERED

STATE_USER

public static final int STATE_USER

STATE_COMPLETE

public static final int STATE_COMPLETE

state

protected int state
Constructor Detail

ExtendedProtocolPresentation

public ExtendedProtocolPresentation()
Construct an empty ExtendedProtocolPresentation.
Method Detail

sendCapsule

public void sendCapsule(ExternalCapsule ec)
Description copied from interface: ExternalChannel
Send an ExternalCapsule to the other end of this channel.
Overrides:
sendCapsule in class ProtocolPresentation
Following copied from class: bees.core.ProtocolPresentation
Parameters:
ec - The ExternalCapsule to send to the protocol.

setState

protected void setState(int newState)

getState

public final int getState()

waitForState

public int waitForState(int nextState,
                        long timeout)

drop

public final void drop()

allocateMessageID

protected long allocateMessageID(ExternalCapsule ec)

lookupMessage

protected ExternalCapsule lookupMessage(long id)

releaseMessageID

protected void releaseMessageID(long id)

register

public void register()

registerReply

public void registerReply(Node node,
                          ExternalCapsule ec)

unregister

public void unregister()

unregisterReply

public void unregisterReply(Node node,
                            ExternalCapsule ec)

addNeighbor

public void addNeighbor(NeighborImpl ni)

addNeighborReply

public void addNeighborReply(Node node,
                             CapabilityReference cr)

remNeighbor

public void remNeighbor(NeighborImpl ni)

remNeighborReply

public void remNeighborReply(Node node,
                             CapabilityReference cr)

receive

public void receive(Node node,
                    ExternalCapsule ec)
Description copied from interface: ExternalCapsuleReceiver
Call back used to handle a newly received ExternalCapsule.
Following copied from interface: bees.core.ExternalCapsuleReceiver
Parameters:
node - The Node object for this domain.
ec - The newly received ExternalCapsule.

userReceive

protected void userReceive(Node node,
                           int method,
                           ExternalCapsule ec)

toString

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

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/