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


Variable Index

 o defaults

Constructor Index

 o Node(Manager, String, String)
constructs a node with given address

Method Index

 o addMediator(Class)
Add a class to the list of security check mediators
 o attachApplication(Application, int)
 o attachChannel(Channel)
 o attachExtension(Extension)
 o checkCapsule()
Security check to see if a capsule directs the invocation
 o deliverToApp(Capsule, int)
 o exportClass(String)
Export a class for use by capsules
 o getAddress()
 o getApplications()
 o getCache()
 o getChannels()
 o getExtension(int)
For capsules to quickly retrieve known extensions
 o getExtensions()
 o getRoutes()
 o log(String)
 o register(Protocol)
Register a protocol for use at this node and start a thread to handle incoming packets -- provided for backward compatibility
 o registerProtocol(Protocol, String)
alternate form of register, returns the flow handle associated with that protocol to the caller.
 o routeForNode(Capsule, int)
 o run()
 o sendToNeighbors(Capsule)
send a capsule to all neighbors.
 o setArgs(KeyArgs)
 o sleep(long)
For use by node components and applications to delay execution
 o start()
 o time()
 o unregister(Protocol)
Unregister a protocol previously registered at this node

Variables

 o defaults
 public static final String defaults[]

Constructors

 o Node
 public Node(Manager b,
             String n,
             String a) throws Exception
constructs a node with given address

Methods

 o getAddress
 public int getAddress()
 o getRoutes
 public RouteTable getRoutes()
 o getApplications
 public Hashtable getApplications()
 o getChannels
 public Channel getChannels()
 o getExtensions
 public Extension[] getExtensions()
 o getCache
 public AutoNodeCache getCache()
 o setArgs
 public void setArgs(KeyArgs k) throws Exception
Overrides:
setArgs in class Entity
 o start
 public void start() throws Exception
Overrides:
start in class Entity
 o 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

 o 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.

 o unregister
 public void unregister(Protocol p)
Unregister a protocol previously registered at this node

 o attachApplication
 public void attachApplication(Application c,
                               int port) throws Exception
 o attachChannel
 public void attachChannel(Channel l)
 o getExtension
 public Extension getExtension(int index)
For capsules to quickly retrieve known extensions

 o attachExtension
 public void attachExtension(Extension e)
 o exportClass
 public void exportClass(String name) throws ClassNotFoundException
Export a class for use by capsules

 o checkCapsule
 public void checkCapsule()
Security check to see if a capsule directs the invocation

 o addMediator
 public void addMediator(Class cl)
Add a class to the list of security check mediators

 o routeForNode
 public boolean routeForNode(Capsule c,
                             int dst)
 o 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.

 o deliverToApp
 public boolean deliverToApp(Capsule c,
                             int d)
 o time
 public long time()
 o log
 public void log(String msg)
 o sleep
 public void sleep(long millis)
For use by node components and applications to delay execution

 o run
 public void run()

All Packages  Class Hierarchy  This Package  Previous  Next  Index