public class CASA extends Object
Title: CASA Agent Infrastructure
Copyright: Copyright (c) 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Company: Knowledge Science Group, Department of Computer Science, University of Calgary
Modifier and Type | Field and Description |
---|---|
(package private) static String[] |
commandArgs |
(package private) static boolean |
noInterface |
(package private) static boolean |
text |
(package private) static boolean |
trace |
Modifier | Constructor and Description |
---|---|
private |
CASA() |
Modifier and Type | Method and Description |
---|---|
static void |
executeCommandLineAgent(String s) |
private static void |
fatalError(String s,
boolean fatal)
Prints the error string, followed by a command-line "usage" paragraph.
|
private static boolean |
isPortTaken(int lacPort) |
static void |
main(String[] args)
Usage:
|
private static void |
setFocusToCommandPanel(AbstractInternalFrame frame) |
static TransientAgent |
startAgent(AgentUI ui,
Class<?> cls,
String name,
int port,
Pair<String,String>... keyValuePairs) |
static TransientAgent |
startAgent(AgentUI ui,
Class<?> cls,
String name,
int port,
String... keyValuePairs) |
static TransientAgent |
startAgent(AgentUI ui,
Pair<String,String>... keys) |
(package private) static void |
startKillOnOutOfMemory() |
private static LAC |
startLAC(AgentUI ui,
int lacPort,
Pair<String,String>... keys) |
private static CASAProcess |
startProcess(AgentUI ui,
int port,
int lacPort) |
(package private) static Pair<String,String>[] |
stringsToPairs(String... strings) |
static boolean trace
static boolean text
static boolean noInterface
static String[] commandArgs
public static void main(String[] args)
casa [-lLtT?] [-LAC [port]] [-NOLAC [port]] [-PROCESS [port]] [-NOPROCESS] [-HELP] [lisp-command]-L, -LAC, -PROCESS, and -NOPROCESS are mutually exclusive. If none of -L, -LAC, -PROCESS, and -NOPROCESS are present then if a LAC exists at -NOLAC (or 9000), then a CASAProcess is started at 9010 or above, otherwise a LAC is started. Qualifiers can be abbreviated to the shortest unique truncation.
where: l: Suppress automatically stating a LAC if there isn't one (same as -NOLAC). L: Automatically start a LAC at port 9000 if there isn't one (same as -LAC). t: turn tracing-to-file on. T: Use a text interface if there's no command on the command line. N: supress starting an interface if there's no command on the command line. ?, HELP: Prints this help text. LAC [port]: Automatically start a LAC at portif there isn't one (defaults to 9000). NOLAC [port]: Do not start a LAC, but expect a LAC at port (defaults to 9000). PROCESS [port]: Automatically start a CASAProcess at port (defaults to 9010). NOPROCESS [port]: Do not start a PROCESS, but run a simple agent that executes the . TAGS [tag-specifier]: Specify the tags for non-agent (process-global) logging. DAEMON: Mark this process such that no agent should start a GUI. Implies N. KILLONLOWMEMORY: If the process runs low on memory, kill the process. Useful for daemons. lisp-command: any legal agent run-time command (runs dialogue mode if this is missing).
args
- Standard command-line args as described abovepublic static void executeCommandLineAgent(String s)
private static void setFocusToCommandPanel(AbstractInternalFrame frame)
public static TransientAgent startAgent(AgentUI ui, Class<?> cls, String name, int port, String... keyValuePairs)
public static TransientAgent startAgent(AgentUI ui, Class<?> cls, String name, int port, Pair<String,String>... keyValuePairs)
private static boolean isPortTaken(int lacPort)
private static CASAProcess startProcess(AgentUI ui, int port, int lacPort)
@SafeVarargs public static TransientAgent startAgent(AgentUI ui, Pair<String,String>... keys)
private static void fatalError(String s, boolean fatal)
s
- error message. Can be null.fatal
- Terminates the program if true by calling System.exit(-1)
.static void startKillOnOutOfMemory()