apps.benchmark
Class PrimerCapsule
java.lang.Object
|
+--bees.core.Packet
|
+--bees.core.ANEPPacket
|
+--bees.core.Capsule
|
+--apps.benchmark.PrimerCapsule
- All Implemented Interfaces:
- NodeCache.EventHandler
- public final class PrimerCapsule
- extends Capsule
- implements NodeCache.EventHandler
Methods inherited from class bees.core.Capsule |
addToPool, checkPermission, clone, decodingException, equals, evaluate, fromCapsule, fromExternal, getCapsuleID, getFlowDesc, getSession, getSession, getSource, internalDecode, internalEncode, internalReset, reset, skipOptions, specializeCapsule |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PrimerCapsule
public PrimerCapsule()
removed
public void removed(Node node,
ProtocolSession ps)
- Description copied from interface:
NodeCache.EventHandler
- This is called when the element is manually removed from
from the cache.
- Specified by:
removed
in interface NodeCache.EventHandler
- Following copied from interface:
bees.core.NodeCache.EventHandler
- Parameters:
node
- The current Node object.ps
- The ProtocolSession that the NodeCache is
collected
public IntegerPermission collected(Node node,
ProtocolSession ps)
- Description copied from interface:
NodeCache.EventHandler
- This is called when this element is up for collection,
the return value specifies the new expiration time. Null
is returned if the element should really be collected.
- Specified by:
collected
in interface NodeCache.EventHandler
- Following copied from interface:
bees.core.NodeCache.EventHandler
- Parameters:
node
- The current Node object.ps
- The ProtocolSession that the NodeCache is attached to.- Returns:
- Null if the element should be collected or an
IntegerPermission specifying the number of milliseconds to delay
before this element should be collected again.
encode
public void encode(Xdr xdr)
- Description copied from class:
Capsule
- Encode this Capsule's state into the given Xdr.
- Overrides:
encode
in class Capsule
- Following copied from class:
bees.core.Capsule
- Parameters:
xdr
- An Xdr object that should be used to encode this Capsule's
state.- Throws:
java.lang.Throwable
- if anything goes wrong.
decode
public void decode(Xdr xdr)
- Description copied from class:
Capsule
- Decode this Capsule's state from the given Xdr.
- Overrides:
decode
in class Capsule
- Following copied from class:
bees.core.Capsule
- Parameters:
xdr
- An Xdr object that contains this Capsule's data.- Throws:
java.lang.Throwable
- if anything goes wrong.
evaluate
public void evaluate(Node node,
ProtocolSession ps)
throws EncodingException,
java.io.IOException
- Description copied from class:
Capsule
- Evaluate this capsule. Basically, this is the function that performs
any computation and forwarding.
- Overrides:
evaluate
in class Capsule
- Following copied from class:
bees.core.Capsule
- Parameters:
node
- The current Node object.ps
- The ProtocolSession bound to this capsule type.- Throws:
java.lang.Throwable
- if anything goes wrong.
toString
public java.lang.String toString()
- Overrides:
toString
in class Capsule
- Following copied from class:
bees.core.Capsule
- 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/