ants
Class Capsule

java.lang.Object
  |
  +--ants.Capsule
Direct Known Subclasses:
DataCapsule, DLResponseCapsule, RouteUpdateCapsule

public abstract class Capsule
extends java.lang.Object

Base class for all types of capsules and their processing


Field Summary
protected static int LVL
           
 
Constructor Summary
Capsule()
           
 
Method Summary
static Capsule create(java.lang.Class cl, Xdr xdr)
           
 Xdr decode()
           
 Xdr encode()
           
abstract  boolean evaluate(Node n)
          There is no longer code to find a named extension; these methods are in the node class -- andrew
static byte[] findGID(java.lang.String name)
          Access point to initialze capsule groupIDs
static byte[] findMID(java.lang.String name)
          Access point to initialze capsule methodIDs
static byte[] findPID(java.lang.String name)
          Access point to initialze capsule protocolIDs
 TypeID getCapsuleID()
           
 ChannelObject getChannel()
           
 int getDst()
           
 int getPrevious()
           
 int getResources()
           
 int getSrc()
           
protected abstract  byte[] gid()
           
 int length()
           
protected abstract  byte[] mid()
           
protected abstract  byte[] pid()
           
 void prime(Capsule parent)
          Prime a capsule created within the network for transmission
 void setDst(int dst)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LVL

protected static final int LVL
Constructor Detail

Capsule

public Capsule()
Method Detail

mid

protected abstract byte[] mid()

pid

protected abstract byte[] pid()

gid

protected abstract byte[] gid()

getCapsuleID

public TypeID getCapsuleID()

getPrevious

public int getPrevious()

getResources

public int getResources()

getChannel

public ChannelObject getChannel()

findMID

public static byte[] findMID(java.lang.String name)
Access point to initialze capsule methodIDs

findGID

public static byte[] findGID(java.lang.String name)
Access point to initialze capsule groupIDs

findPID

public static byte[] findPID(java.lang.String name)
Access point to initialze capsule protocolIDs

evaluate

public abstract boolean evaluate(Node n)
There is no longer code to find a named extension; these methods are in the node class -- andrew

getSrc

public int getSrc()

getDst

public int getDst()

setDst

public void setDst(int dst)

length

public int length()

encode

public Xdr encode()

decode

public Xdr decode()

prime

public final void prime(Capsule parent)
Prime a capsule created within the network for transmission

create

public static Capsule create(java.lang.Class cl,
                             Xdr xdr)