| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.runtime.Main
public final class Main
Primary entry-point into the JIST system. Performs cmd-line parsing, and general initialisation of the simulation system.
| Nested Class Summary | |
|---|---|
| static class | Main.CommandLineOptionsParsed JiST command-line options. | 
| Field Summary | |
|---|---|
| static boolean | ASSERTWhether certain checks should be turned on. | 
| static long | CLIENT_PING_INTERVALInterval between JiST server pings to client. | 
| static long | CONTROLLER_DISPLAY_INTERVALInterval between JiST controller progress output. | 
| static boolean | COUNT_EVENTSWhether to count up events of each type. | 
| static boolean | EVENT_LOCATIONdebugging: whether to compute event locations (high overhead). | 
| static boolean | EVENT_TRACEdebugging: whether to keep event traces (some overhead). | 
| static int | EVENT_TRACE_DEPTHdebugging: event causality trace depth. | 
| static int | GUILOG_SIZEEvent window size of GUI log. | 
| static int | JIST_PORTDefault jist server (RMI) port. | 
| static java.lang.String | JIST_PROPERTIESDefault jist properties file name. | 
| static boolean | REWRITE_CACHEWhether rewritten classes should be cached. | 
| static long | SERVER_DISPLAY_INTERVALInterval between JiST server progress output to job queue. | 
| static long | SERVER_QUEUE_RELEASE_INTERVALInterval for queue to check that server is still alive. | 
| static boolean | SINGLE_CONTROLLERWhether to assume a single controller. | 
| static java.lang.String | VERSIONJiST version. | 
| Constructor Summary | |
|---|---|
| Main() | |
| Method Summary | |
|---|---|
| static boolean | isRunning()Return whether JiST is running. | 
| static void | jobPump(RemoteJist.JobQueueServerRemote jqs)Dequeue and process jobs from queue. | 
| static void | main(java.lang.String[] args)JiST command-line entry point. | 
| static void | recycleMem()Try to force a flush of all memory from previous simulation. | 
| static void | runClient(Main.CommandLineOptions options)Run a JiST client. | 
| static void | runServer(java.lang.String host,
          Main.CommandLineOptions options)Run a JiST server. | 
| static void | runSimulation(Main.CommandLineOptions options,
              java.util.Properties properties,
              RemoteJist.JistClientRemote remote,
              java.io.PrintStream serverOut,
              RemoteJist.PingRemote ping)Run a single simulation with given command-line options. | 
| static void | runSimulationRedirect(Main.CommandLineOptions options,
                      java.util.Properties properties,
                      RemoteJist.JistClientRemote remote)Redirect output streams and run simulation. | 
| static void | showUsage()Display JiST syntax help. | 
| static void | showVersion()Display JiST version information. | 
| static java.lang.Thread | startClientPingThread(RemoteJist.PingRemote ping,
                      Controller controller)Initiate a server thread to ping client, and abort simulation if client dies. | 
| static java.lang.Thread | startDisplayThread(RemoteJist.JobQueueServerRemote jqs)Start server display thread to report simulation status to server queue. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String VERSION
public static final boolean EVENT_TRACE
public static final int EVENT_TRACE_DEPTH
public static final boolean EVENT_LOCATION
public static final boolean REWRITE_CACHE
public static final boolean ASSERT
public static final boolean COUNT_EVENTS
public static final boolean SINGLE_CONTROLLER
public static final int GUILOG_SIZE
public static final long CONTROLLER_DISPLAY_INTERVAL
public static final long SERVER_DISPLAY_INTERVAL
public static final long CLIENT_PING_INTERVAL
public static final long SERVER_QUEUE_RELEASE_INTERVAL
public static final int JIST_PORT
public static final java.lang.String JIST_PROPERTIES
| Constructor Detail | 
|---|
public Main()
| Method Detail | 
|---|
public static void showVersion()
public static void showUsage()
public static boolean isRunning()
public static void runSimulation(Main.CommandLineOptions options,
                                 java.util.Properties properties,
                                 RemoteJist.JistClientRemote remote,
                                 java.io.PrintStream serverOut,
                                 RemoteJist.PingRemote ping)
options - command-line optionsproperties - jist propertiesremote - jist client stubserverOut - local server output stream; null for local executionping - remote client ping object, or null if local
public static void runSimulationRedirect(Main.CommandLineOptions options,
                                         java.util.Properties properties,
                                         RemoteJist.JistClientRemote remote)
options - command-line optionsproperties - jist propertiesremote - jist client stub
public static void runClient(Main.CommandLineOptions options)
                      throws java.net.MalformedURLException,
                             java.rmi.NotBoundException,
                             java.rmi.RemoteException
options - command-line options
java.net.MalformedURLException - never
java.rmi.NotBoundException - remote JiST server not initialized
java.rmi.RemoteException - rpc failure
public static void recycleMem()
                       throws java.lang.InterruptedException
java.lang.InterruptedException - local server simulation thread interuptted
public static void jobPump(RemoteJist.JobQueueServerRemote jqs)
                    throws java.rmi.RemoteException,
                           java.lang.InterruptedException
jqs - (remote) job queue
java.rmi.RemoteException - rpc failure
java.lang.InterruptedException - local server simulation thread interupttedpublic static java.lang.Thread startDisplayThread(RemoteJist.JobQueueServerRemote jqs)
jqs - remote job queue server
public static java.lang.Thread startClientPingThread(RemoteJist.PingRemote ping,
                                                     Controller controller)
ping - remote ping object, or null if localcontroller - controller running simulation
public static void runServer(java.lang.String host,
                             Main.CommandLineOptions options)
                      throws java.net.MalformedURLException,
                             java.rmi.NotBoundException,
                             java.rmi.AlreadyBoundException,
                             java.rmi.RemoteException,
                             java.lang.InterruptedException
host - server nameoptions - command-line options
java.net.MalformedURLException - never
java.rmi.NotBoundException - remote JiST server not initialized
java.rmi.AlreadyBoundException - unable to initialize local server
java.rmi.RemoteException - rpc failure
java.lang.InterruptedException - local server simulation thread interupttedpublic static void main(java.lang.String[] args)
args - command-line arguments| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||