|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--bees.core.Neighbor
A Neighbor is used to "activate" a NeighborImpl for a protocol flow. In this context, "activation" involves attaching handlers to receive and send capsules.
NeighborImpl,
Neighborhood| Constructor Summary | |
Neighbor(NeighborImpl ni)
Construct a Neighbor that uses the given capability for communication. |
|
| Method Summary | |
void |
attachReceivers(ProtocolSession ps)
Attach the receiver hooks for a set of capsule types. |
void |
dequeueKey()
Dequeue a key previously enqueued. |
void |
detachReceivers(ProtocolSession ps)
Detach the receiver hooks for a set of capsule types. |
void |
enqueueKey(CapabilityEnvelope ce,
java.lang.String algorithm)
Enqueue a key for checking hop-by-hop integrity. |
void |
enqueueKey(SecretKey sk,
java.lang.String algorithm)
Enqueue a key for checking hop-by-hop integrity. |
NeighborImpl |
getNeighborImpl()
|
void |
send(Capsule cap)
Send a Capsule to this neighbor. |
void |
send(CapsuleGroup cg)
Send a group of capsule to this neighbor. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Neighbor(NeighborImpl ni)
ni - The neighbor capability to use for communication.| Method Detail |
public final NeighborImpl getNeighborImpl()
public void enqueueKey(CapabilityEnvelope ce,
java.lang.String algorithm)
throws MissingCapabilityException,
java.security.NoSuchAlgorithmException,
java.lang.InstantiationException,
java.security.InvalidKeyException
ce - An envelope containing the secret key to use when computing
MACs.algorithm - The MAC algorithm to use with the key.MissingCapabilityException - If the capability has since been
deleted.java.lang.InstantiationException - If there was an error constructing the
SecretKey capability.java.security.NoSuchAlgorithmException - If the algorithm value is unknown.java.security.InvalidKeyException - If the given key is invalid.
public void enqueueKey(SecretKey sk,
java.lang.String algorithm)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
sk - The SecretKey to use when computing MACs.algorithm - The MAC algorithm to use with the key.java.security.NoSuchAlgorithmException - If the algorithm value is unknown.java.security.InvalidKeyException - If the given key is invalid.public void dequeueKey()
public final void attachReceivers(ProtocolSession ps)
throws java.io.IOException
ps - A ProtocolSession whose capsule types should have receivers
attached.public final void detachReceivers(ProtocolSession ps)
ps - A ProtocolSession whose capsule types should have receivers
detached.
public void send(Capsule cap)
throws EncodingException,
java.io.IOException
cap - The Capsule to send.Throws - an EncodingException if there was an error while
marshalling the capsule.Throws - an IOException if there was an error during
transmission.
public void send(CapsuleGroup cg)
throws EncodingException,
java.io.IOException
cg - The CapsuleGroup to send.Throws - an EncodingException if there was an error while
marshalling the capsule(s).Throws - an IOException if there was an error during
transmission.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||