copyright The Portico Project 2008.

org.portico.core
Class Main

java.lang.Object
  extended by org.portico.core.Main

public class Main
extends Object

This method is used to start a stand-alone instance of the RTI. It is called by the various startup scripts.

NOTE: On startup, the main method will store an instance of the RTIExec it creates in the EXECUTION static variable. Subsequent calls to the main method will cause this to be overwritten, removing any ability to directly contact the previous execution (unless a reference to it has been kept somewhere).


Field Summary
static String[] COMMAND_LINE
           
static RTIExec EXECUTION
          the execution for this instance of the server
private static org.apache.log4j.Logger LOG
           
 
Constructor Summary
Main()
           
 
Method Summary
static String initialMessage()
           
private static void logSystemInformation()
          This method logs information about all the currently loaded modules that are associated with the newly created RTI.
static void main(String[] args)
          The method creates, configures and starts a new RTIExec.
private static String pad(String initial)
           
private static void printUsage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static org.apache.log4j.Logger LOG

COMMAND_LINE

public static String[] COMMAND_LINE

EXECUTION

public static RTIExec EXECUTION
the execution for this instance of the server

Constructor Detail

Main

public Main()
Method Detail

main

public static void main(String[] args)
The method creates, configures and starts a new RTIExec. It performs the following actions (in order):
  1. Process the command line arguments. If the --gui argument is provided, the management gui is started (see ManagementGUI.main(String[])
  2. Logs all initial messages
  3. Creates and configures a new RTIExec
  4. Starts the RTIExec via RTIExec.startup()
  5. Exits
Once it has completed its work, the main thread exists. The RTIExec has its own running threads keeping the JVM alive. The RTIExec also registers a ShutdownHook to elegantly handle abrupt exits (Ctrl-C). If there is a problem starting the RTI instance, this method will exit, killing the runtime manually (System.exit). There are some circumstances when this action is desired, such as when the user provides the "help" command line argument.


initialMessage

public static String initialMessage()

printUsage

private static void printUsage()

pad

private static String pad(String initial)

logSystemInformation

private static void logSystemInformation()
This method logs information about all the currently loaded modules that are associated with the newly created RTI.


copyright The Portico Project 2008.