concast.base
Class SpecBase
java.lang.Object
|
+--concast.base.SpecBase
- public abstract class SpecBase
- extends java.lang.Object
The main class that has to be extended to create the merge spec.
4 methods are described in the concast internet draft
Field Summary |
UserAPI |
userAPI
This object can be used to call methods from the user API |
Method Summary |
abstract PacketAndState |
buildMsg(MergeState state)
This function takes a MergeState and
returns a datagram containing a transport header,
and payload. |
abstract boolean |
checkAndDecrypt(ConcastPacket msg)
This function takes a ConcastPacket, decrypts it and
returns true if it was decrypted properly. |
abstract boolean |
done(MergeState state)
The predicate done() on MergeState, which returns "true" when
a datagram needs to be constructed and forwarded. |
abstract long |
getTag(ConcastPacket msg)
This function determines the Datagram
Equivalence Class to which a given packet belongs. |
abstract void |
merge(MergeState state,
ConcastPacket msg)
This function takes a MergeState, a concast
datagram, and per-flow information and returns an updated
MergeState. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
userAPI
public UserAPI userAPI
- This object can be used to call methods from the user API
SpecBase
public SpecBase()
getTag
public abstract long getTag(ConcastPacket msg)
- This function determines the Datagram
Equivalence Class to which a given packet belongs. Typically this
function will extract a value from a particular location or
locations in the datagram (header and/or payload). It might also
compute a digest of the datagram's payload.
merge
public abstract void merge(MergeState state,
ConcastPacket msg)
- This function takes a MergeState, a concast
datagram, and per-flow information and returns an updated
MergeState. This function does the real work of merging,
combining information from an incoming datagram with information
derived from previously processed datagrams.
done
public abstract boolean done(MergeState state)
- The predicate done() on MergeState, which returns "true" when
a datagram needs to be constructed and forwarded.
buildMsg
public abstract PacketAndState buildMsg(MergeState state)
- This function takes a MergeState and
returns a datagram containing a transport header,
and payload.
checkAndDecrypt
public abstract boolean checkAndDecrypt(ConcastPacket msg)
- This function takes a ConcastPacket, decrypts it and
returns true if it was decrypted properly.