All Packages  This Package  Class Hierarchy  Class Search  Index

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

  Summary

public class  NodeConfigure
     extends edu.utah.janos.nodeos.FlowRun
{
          // Fields 2
     private static boolean beenHere;
     private Flow flow;

          // Constructors 1
     public NodeConfigure();

          // Methods 6
     private static String[] grokArgFile(String) throws FileNotFoundException, IOException, LineListException;
     public static void main(String[]) throws Exception;

     protected BufferHandle newBufferHandle();
     private void parseCommandLine(String[]) throws FileNotFoundException, IOException, InvalidKeyArgsException, AddressFormatException, NoSuchNodeAddress, InterruptedException, LineListException;
     protected void recycleBufferHandle(BufferHandle);
     protected void run(Flow, ThreadPool, String[], CommSpaceHandle);
}

Performs one-time configuration of a Node to get it on its feet.

An alternative to the MIT ANTS ConfigurationManager.

Usage: NodeConfigure [options]

  • ActiveAddress: the active address of the Node. Must be an IP-like dotted-quad.
  • PhysicalAddress: the active address of the Node. Must be a host:port pair.
  • Options:
  • -consoleport : Start a telnet console on the given port.
  • -routes : Static routing table is in file.
  • -updateRoutes: If dynamic routing updates should be pushed out.
  • -application : Read appfile to configure & start an application.
  • -extension : Read extfile to configure and install an extension.
  • -msgprefix : Prefix all messages with
  • The files appfile and extfile are simple files that are unceremoniously pushed into KeyArgs. They should define the application.

    Author:
    Janos Ministry of Development




      Fields

    · beenHere

    Summary  |  Top

       private static boolean beenHere
    

    XXX A hack. Move into PrimordialNode so that ConfigurationManager and NodeConfigure will be mutually exclusive.


    · flow

    Summary  |  Top
       private Flow flow
    


      Constructors

    · NodeConfigure

    Summary  |  Top

       public NodeConfigure() 

    Default constructor



      Methods

    · run

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

    Configure this Node. Prints a usage message if insufficient arguments are given.

    The flow that starts this ball rolling will become the basic flow in the system.

    Parameter Description
    args the node configuration. See the class documentation.

    Overrides:
    run in class FlowRun


    · parseCommandLine

    Summary  |  Top
       private void parseCommandLine(String[] args)  throws FileNotFoundException, IOException, InvalidKeyArgsException, AddressFormatException, NoSuchNodeAddress, InterruptedException, LineListException

    Parse the command line arguments to NodeConfigure. Most arguments are passed into PrimordialNode in some fashion. However, -application and -extension arguments have their files parsed and put into the apps and exts return parameters.

    DOES NOT RETURN.



    · grokArgFile

    Summary  |  Top
       private static String[] grokArgFile(String filename)  throws FileNotFoundException, IOException, LineListException

    Grok an arg file (for a weak definition of grok). Just turns the contents of the file into an array of Strings, one for each token.



    · 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



    · main

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

    This doesn't work. Its just here to prevent folks from getting really confused.

    See Also: run



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