bees.core
Class ProtocolFlow
java.lang.Object
|
+--bees.core.ProtocolFlow
- public class ProtocolFlow
- extends java.lang.Object
A ProtocolFlow is used to construct a description of a group of protocols,
the primary and its companions, and any user specified data.
Field Summary |
static java.lang.String |
COMPANION_PROTOCOL
The tag name given to any companion protocols in the PairChain. |
static java.lang.String |
PRIMARY_PROTOCOL
The tag name given to the primary protocol in the PairChain. |
Constructor Summary |
ProtocolFlow()
Construct an empty ProtocolFlow object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PRIMARY_PROTOCOL
public static final java.lang.String PRIMARY_PROTOCOL
- The tag name given to the primary protocol in the PairChain.
COMPANION_PROTOCOL
public static final java.lang.String COMPANION_PROTOCOL
- The tag name given to any companion protocols in the PairChain.
ProtocolFlow
public ProtocolFlow()
- Construct an empty ProtocolFlow object.
setPrimaryProtocol
public final ProtocolFlow setPrimaryProtocol(java.lang.String primaryProtocol)
- Parameters:
primaryProtocol
- The name of the primary protocol.- Returns:
- this
getPrimaryProtocol
public final java.lang.String getPrimaryProtocol()
- Returns:
- The name of the primary protocol.
addCompanion
public final ProtocolFlow addCompanion(java.lang.String name)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
- Add a companion protocol to the flow description.
- Parameters:
name
- The name of the companion protocol.- Returns:
- this
addPair
public final ProtocolFlow addPair(Pair pair)
- Parameters:
pair
- A pair to add to the description.- Returns:
- this
addPair
public final ProtocolFlow addPair(java.lang.String tag,
java.lang.String value)
- Parameters:
tag
- The name part of the pair.value
- The value part of the pair.- Returns:
- this
addPair
public final ProtocolFlow addPair(java.lang.String tag,
byte[] value)
- Parameters:
tag
- The name part of the pair.value
- The value part of the pair.- Returns:
- this
getPair
public final Pair getPair(java.lang.String tag,
int instance)
- Parameters:
tag
- The pair name to get.instance
- The instance of the name to get.- Returns:
- The Pair object if it was found or NULL.
getPair
public final Pair getPair(java.lang.String tag)
- Parameters:
tag
- The pair name to get.- Returns:
- The Pair object if it was found or NULL.
instantiate
public static final ProtocolFlow instantiate(byte[] bytes)
- Parameters:
bytes
- A flattened ProtocolFlow object.- Returns:
- A new ProtocolFlow object initialized with the values in
"bytes".
toBytes
public final byte[] toBytes()
- Returns:
- A flattened version of this ProtocolFlow.
getFlowDesc
public final PairChain getFlowDesc()
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
- Returns:
- A PairChain constructed from the values in this description.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
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/