apps.discovery
Class DiscoveryProtocolPresentation
java.lang.Object
|
+--bees.core.ProtocolPresentation
|
+--bees.core.ExtendedProtocolPresentation
|
+--apps.discovery.DiscoveryProtocolPresentation
- All Implemented Interfaces:
- ExternalCapsuleReceiver, ExternalChannel
- Direct Known Subclasses:
- AuthenticatorDiscoveryPresentation
- public class DiscoveryProtocolPresentation
- extends ExtendedProtocolPresentation
A DiscoveryProtocolPresentation is used to communicate with the
DiscoveryProtocolSession in the protocol's domain.
Method Summary |
void |
advertise(NeighborImpl ni,
byte[] material,
byte[] signature)
Ask the protocol to advertise some data for us. |
void |
died(TypeID fp)
Tell the protocol that some discovered material has expired and should
be removed from its internal state. |
void |
found(CapabilityReference cr,
TypeID fp,
byte[] material,
byte[] signature)
Callback used to tell an application about a new neighbor. |
java.lang.String |
toString()
|
protected void |
userReceive(Node node,
int method,
ExternalCapsule ec)
|
Methods inherited from class bees.core.ExtendedProtocolPresentation |
addNeighbor, addNeighborReply, allocateMessageID, drop, getState, lookupMessage, receive, register, registerReply, releaseMessageID, remNeighbor, remNeighborReply, sendCapsule, setState, unregister, unregisterReply, waitForState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DiscoveryProtocolPresentation
public DiscoveryProtocolPresentation()
- Construct an empty DiscoveryProtocolPresentation.
advertise
public void advertise(NeighborImpl ni,
byte[] material,
byte[] signature)
- Ask the protocol to advertise some data for us.
- Parameters:
ni
- The neighbor to use when broadcasting the advertisement.material
- The material to advertise.signature
- The signature covering "material" or NULL.
died
public void died(TypeID fp)
- Tell the protocol that some discovered material has expired and should
be removed from its internal state.
XXX Is this still needed?
- Parameters:
fp
- The finger print of the expired data.
found
public void found(CapabilityReference cr,
TypeID fp,
byte[] material,
byte[] signature)
- Callback used to tell an application about a new neighbor.
- Parameters:
cr
- A reference to the neighbor object that received the
advertisement.fp
- The finger print of the discovered material.material
- The discovered material.signature
- The signature of the material.
userReceive
protected void userReceive(Node node,
int method,
ExternalCapsule ec)
- Overrides:
userReceive
in class ExtendedProtocolPresentation
- See Also:
ExtendedProtocolPresentation.userReceive(Node, int, ExternalCapsule)
toString
public java.lang.String toString()
- Overrides:
toString
in class ExtendedProtocolPresentation
- See Also:
Object.toString()
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/