ants
Class Node
java.lang.Object
|
+--ants.Entity
|
+--ants.ManagedObject
|
+--ants.Node
- public class Node
- extends ManagedObject
- implements java.lang.Runnable
node of an active network
Field Summary |
static java.lang.String[] |
defaults
|
Constructor Summary |
Node(Manager b,
java.lang.String n,
java.lang.String a)
constructs a node with given address |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
defaults
public static final java.lang.String[] defaults
Node
public Node(Manager b,
java.lang.String n,
java.lang.String a)
throws java.lang.Exception
- constructs a node with given address
getAddress
public int getAddress()
getRoutes
public RouteTable getRoutes()
getApplications
public java.util.Hashtable getApplications()
getChannels
public Channel getChannels()
getExtensions
public java.util.Hashtable getExtensions()
getExtension
public Extension getExtension(java.lang.String name)
getCache
public AutoNodeCache getCache()
setArgs
public void setArgs(KeyArgs k)
throws java.lang.Exception
- Overrides:
- setArgs in class Entity
start
public void start()
throws java.lang.Exception
- Overrides:
- start in class Entity
register
public void register(Protocol p)
throws java.lang.Exception
- Register a protocol for use at this node
unregister
public void unregister(Protocol p)
- Unregister a protocol previously registered at this node
attachApplication
public void attachApplication(Application c,
int port)
throws java.lang.Exception
attachChannel
public void attachChannel(Channel l)
attachExtension
public void attachExtension(Extension e,
java.lang.String name)
exportClass
public void exportClass(java.lang.String name)
throws java.lang.ClassNotFoundException
- Export a class for use by capsules
checkCapsule
public void checkCapsule()
- Security check to see if a capsule directs the invocation
addMediator
public void addMediator(java.lang.Class cl)
- Add a class to the list of security check mediators
routeForNode
public boolean routeForNode(Capsule c,
int dst)
sendToNeighbors
public boolean sendToNeighbors(Capsule c)
deliverToApp
public boolean deliverToApp(Capsule c,
int d)
time
public long time()
log
public void log(java.lang.String msg)
sleep
public void sleep(long millis)
- For use by node components and applications to delay execution
run
public void run()
- Specified by:
- run in interface java.lang.Runnable