|
|||||||||
| 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.CommandLineOptions
Parsed JiST command-line options. |
| Field Summary | |
|---|---|
static boolean |
ASSERT
Whether certain checks should be turned on. |
static long |
CLIENT_PING_INTERVAL
Interval between JiST server pings to client. |
static long |
CONTROLLER_DISPLAY_INTERVAL
Interval between JiST controller progress output. |
static boolean |
COUNT_EVENTS
Whether to count up events of each type. |
private static RemoteJist.Job |
currentJob
current job. |
static boolean |
EVENT_LOCATION
debugging: whether to compute event locations (high overhead). |
static boolean |
EVENT_TRACE
debugging: whether to keep event traces (some overhead). |
static int |
EVENT_TRACE_DEPTH
debugging: event causality trace depth |
static int |
GUILOG_SIZE
Event window size of GUI log. |
static int |
JIST_PORT
Default jist server (RMI) port. |
static java.lang.String |
JIST_PROPERTIES
Default jist properties file name. |
static boolean |
REWRITE_CACHE
Whether rewritten classes should be cached. |
private static boolean |
running
whether jist is running. |
static long |
SERVER_DISPLAY_INTERVAL
Interval between JiST server progress output to job queue. |
static long |
SERVER_QUEUE_RELEASE_INTERVAL
Interval for queue to check that server is still alive. |
static boolean |
SINGLE_CONTROLLER
Whether to assume a single controller. |
static java.lang.String |
VERSION
JiST 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. |
private static Main.CommandLineOptions |
parseCommandLineOptions(java.lang.String[] args)
Parse command-line arguments. |
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
private static boolean running
private static RemoteJist.Job currentJob
| Constructor Detail |
|---|
public Main()
| Method Detail |
|---|
public static void showVersion()
public static void showUsage()
private static Main.CommandLineOptions parseCommandLineOptions(java.lang.String[] args)
throws jargs.gnu.CmdLineParser.OptionException,
java.net.UnknownHostException
args - command-line arguments
CmdLineParser.OptionException - illegal command line option
java.net.UnknownHostException - unable to parse remote host address:portpublic 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 | ||||||||