ants
Class Protocol
java.lang.Object
|
+--ants.Protocol
- Direct Known Subclasses:
- BuiltinProtocol
- public class Protocol
- extends java.lang.Object
Base class for all protocols. Intended to be subclassed
for each user-defined protocol for the purpose of collecting
capsules into a protocol and registering it at the local node.
Field Summary |
protected java.util.Vector |
capsules
|
protected java.util.Vector |
groups
|
Constructor Summary |
protected |
Protocol()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
groups
protected java.util.Vector groups
capsules
protected java.util.Vector capsules
Protocol
protected Protocol()
startProtocolDefn
protected void startProtocolDefn()
endProtocolDefn
protected void endProtocolDefn()
startGroupDefn
protected void startGroupDefn()
endGroupDefn
protected void endGroupDefn()
throws java.lang.Exception
addCapsule
protected void addCapsule(java.lang.String name)
throws java.lang.Exception
addHelperClass
protected void addHelperClass(java.lang.String name)
throws java.lang.Exception
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Test with a subclass-like constructor. The need to create a
generic protocol here is the only reason this class isn't abstract.