org.portico.core
Class Main
java.lang.Object
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).
Constructor Summary |
Main()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Main
public Main()
main
public static void main(String[] args)
- The method creates, configures and starts a new
RTIExec
. It performs the following
actions (in order):
- Process the command line arguments. If the --gui argument is provided, the management
gui is started (see
ManagementGUI.main(String[])
- Logs all initial messages
- Creates and configures a new
RTIExec
- Starts the
RTIExec
via RTIExec.startup()
- 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.