Bees v0.5.0 API

apps.discovery
Class DiscoveryProtocolSession

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

public final class DiscoveryProtocolSession
extends ExtendedProtocolSession

A DiscoveryProtocolSession tracks information used by the protocol and manages communication with the 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
DiscoveryProtocolSession()
          Construct an empty DiscoveryProtocolSession.
 
Method Summary
 void attachNeighbor(Node node, Neighbor neighbor)
          Call back used to attach receivers for this protocol's Capsules.
 void foundMaterial(TypeID fp, AdvertiseCapsule ac)
          Notify any interested applications of the discovery of new material.
 java.util.Hashtable getDiscoveredMaterial()
           
 DiscoveryParameters getDiscoveryParameters()
           
 java.util.Hashtable getLocalMaterial()
           
 void setDiscoveryParameters(DiscoveryParameters dp)
           
 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, detachNeighbor, getByteArray, getCache, removeNeighbor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiscoveryProtocolSession

public DiscoveryProtocolSession()
Construct an empty DiscoveryProtocolSession.
Method Detail

setDiscoveryParameters

public void setDiscoveryParameters(DiscoveryParameters dp)
Parameters:
dp - The parameters to this protocol flow.

getDiscoveryParameters

public DiscoveryParameters getDiscoveryParameters()
Returns:
The parameters to this protocol flow.

getDiscoveredMaterial

public java.util.Hashtable getDiscoveredMaterial()
Returns:
The set of discovered advertisements.

getLocalMaterial

public java.util.Hashtable getLocalMaterial()
Returns:
The set of local advertisements.

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)

foundMaterial

public void foundMaterial(TypeID fp,
                          AdvertiseCapsule ac)
Notify any interested applications of the discovery of new material.
Parameters:
fp - The finger print of the material.
ac - The AdvertiseCapsule that carried the newly discovered material.

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/