All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.antsr.core.ConfigurationManager
java.lang.Object
   |
   +----edu.utah.janos.nodeos.FlowRun
           |
           +----edu.utah.janos.antsr.core.ConfigurationManager

  Summary

public class  ConfigurationManager
     extends edu.utah.janos.nodeos.FlowRun
{
          // Fields 3
     private Flow flow;
     static int port;
     private ThreadPool threadPool;

          // Constructors 1
     public ConfigurationManager();

          // Methods 6
     public static void main(String[]) throws Exception;

     protected BufferHandle newBufferHandle();
     private final void parseCommandLine(Vector, String[]) throws AddressFormatException, ArrayIndexOutOfBoundsException, AttachException, ClassNotFoundException, IllegalAccessException, InstantiationException, InvalidKeyArgsException;
     private final void parseCommands(Vector, String[]);
     protected void recycleBufferHandle(BufferHandle);
     protected void run(Flow, ThreadPool, String[], CommSpaceHandle) throws Exception;
}

A configuration manager that creates a node interface, channel and app configuration. Gets the configuration from a control file.

Really, these functions could go on the Node class.

XXX this shouldn't be public, or arbitrary Capsules can call it up...

Author:
Janos Ministry of Development , David Wetherall




  Fields

· flow

Summary  |  Top

   private Flow flow


· threadPool

Summary  |  Top
   private ThreadPool threadPool


· port

Summary  |  Top
   static int port

Not private so that the inner Runnable() created on the channel command can see it and use it for the thread it starts up on the main message loop.


  Constructors

· ConfigurationManager

Summary  |  Top

   public ConfigurationManager() 

Default constructor



  Methods

· parseCommandLine

Summary  |  Top
   private final void parseCommandLine(Vector appVector, 
                                       String[] command)  throws AddressFormatException, ArrayIndexOutOfBoundsException, AttachException, ClassNotFoundException, IllegalAccessException, InstantiationException, InvalidKeyArgsException

Parse a single command.

Parameter Description
node the node to attach created entities to
command array of command and its argument words

Throws: AddressFormatException
if an address parameter is bad
Throws: ArrayIndexOutOfBoundsException
if insufficent paramters are given for some commands.
Throws: AttachException
if attaching Channel/Extension/App fails
Throws: ClassNotFoundException
if any dynamically loaded class isn't found.
Throws: IllegalAccessException
if newInstance() fails
Throws: InstantiationException
if newInstance() fails
Throws: InvalidKeyArgsException
if any optional args are improperly formatted


· parseCommands

Summary  |  Top
   private final void parseCommands(Vector apps, 
                                    String[] params) 



· main

Summary  |  Top
   public static void main(String[] args)  throws Exception

OLD way to start an ANTS node. Does not apply in ANTSR.

See Also: run



· newBufferHandle

Summary  |  Top
   protected BufferHandle newBufferHandle() 

Part of the FlowRun interface

Overrides:
newBufferHandle in class FlowRun

See Also: core.FlowRun



· recycleBufferHandle

Summary  |  Top
   protected void recycleBufferHandle(BufferHandle bh) 

Part of the FlowRun interface

Overrides:
recycleBufferHandle in class FlowRun

See Also: core.FlowRun



· run

Summary  |  Top
   protected void run(Flow flow, 
                      ThreadPool threadPool, 
                      String[] args, 
                      CommSpaceHandle commSpaceHandle)  throws Exception

Start a new configuration manager. Prints a usage message of insufficient arguments are given.

Parameter Description
args the arguments to pass to the ConfigurationManager constructor.

Overrides:
run in class FlowRun

See Also: ConfigurationManager



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7