All Packages Class Hierarchy This Package Previous Next Index
Class ants.Node
java.lang.Object
|
+----ants.Entity
|
+----ants.ManagedObject
|
+----ants.Node
- public class Node
- extends ManagedObject
- implements Runnable
node of an active network
-
defaults
-
-
Node(Manager, String, String)
- constructs a node with given address
-
addMediator(Class)
- Add a class to the list of security check mediators
-
attachApplication(Application, int)
-
-
attachChannel(Channel)
-
-
attachExtension(Extension)
-
-
checkCapsule()
- Security check to see if a capsule directs the invocation
-
deliverToApp(Capsule, int)
-
-
exportClass(String)
- Export a class for use by capsules
-
getAddress()
-
-
getApplications()
-
-
getCache()
-
-
getChannels()
-
-
getExtension(int)
- For capsules to quickly retrieve known extensions
-
getExtensions()
-
-
getRoutes()
-
-
log(String)
-
-
register(Protocol)
- Register a protocol for use at this node and start a thread to
handle incoming packets -- provided for backward compatibility
-
registerProtocol(Protocol, String)
- alternate form of register, returns the flow handle associated with
that protocol to the caller.
-
routeForNode(Capsule, int)
-
-
run()
-
-
sendToNeighbors(Capsule)
- send a capsule to all neighbors.
-
setArgs(KeyArgs)
-
-
sleep(long)
- For use by node components and applications to delay execution
-
start()
-
-
time()
-
-
unregister(Protocol)
- Unregister a protocol previously registered at this node
defaults
public static final String defaults[]
Node
public Node(Manager b,
String n,
String a) throws Exception
- constructs a node with given address
getAddress
public int getAddress()
getRoutes
public RouteTable getRoutes()
getApplications
public Hashtable getApplications()
getChannels
public Channel getChannels()
getExtensions
public Extension[] getExtensions()
getCache
public AutoNodeCache getCache()
setArgs
public void setArgs(KeyArgs k) throws Exception
- Overrides:
- setArgs in class Entity
start
public void start() throws Exception
- Overrides:
- start in class Entity
register
public void register(Protocol p) throws Exception
- Register a protocol for use at this node and start a thread to
handle incoming packets -- provided for backward compatibility
registerProtocol
public FlowHandle registerProtocol(Protocol p,
String protName) throws Exception
- alternate form of register, returns the flow handle associated with
that protocol to the caller.
unregister
public void unregister(Protocol p)
- Unregister a protocol previously registered at this node
attachApplication
public void attachApplication(Application c,
int port) throws Exception
attachChannel
public void attachChannel(Channel l)
getExtension
public Extension getExtension(int index)
- For capsules to quickly retrieve known extensions
attachExtension
public void attachExtension(Extension e)
exportClass
public void exportClass(String name) throws 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(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)
- send a capsule to all neighbors.
XXX remove that comment if cleared
Previously, this method used a list of neighbors, maintained in
RouteTable. This list, however, included only those neighbors known
at initialization time. djw said that's a bug, so I'm using the
current list, returned in an Enumeration by the RouteTable.
hope that didn't break the auction.
deliverToApp
public boolean deliverToApp(Capsule c,
int d)
time
public long time()
log
public void log(String msg)
sleep
public void sleep(long millis)
- For use by node components and applications to delay execution
run
public void run()
All Packages Class Hierarchy This Package Previous Next Index