|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectti.chimera.Main
This is where it all begins. The Main
class instantiates the
registry, the script interpreter, and then evaluates bootstrap.os,
which is where everything else happens. The bootstrap.os essentially
defines the application.
Nested Class Summary | |
static class |
Main.ChimeraThreadGroup
|
static interface |
Main.Logger
A logger's log method is called with log messages, such
as loading or starting a plugin, etc. |
Constructor Summary | |
Main(java.lang.String[] args,
java.lang.String[] sargs)
Class Constructor. |
Method Summary | |
void |
addLogger(Main.Logger logger)
Add a logger. |
void |
atExit(java.lang.Runnable hook)
Add some code to run at shutdown time. |
void |
debug(int level,
java.lang.String msg)
|
void |
error(java.lang.String msg)
|
void |
error(java.lang.String name,
java.lang.String msg)
|
static void |
exit(int status)
Cause the system to exit, running at-exit-runnables. |
void |
fatalError(java.lang.String str)
Called for fatal errors, for example during startup. |
java.io.PrintWriter |
getErr()
Get the stderr stream. |
java.lang.String |
getHistory()
|
java.io.BufferedReader |
getIn()
Get the stdin stream. |
java.io.PrintWriter |
getOut()
Get the stdout stream. |
Registry |
getRegistry()
Get the Registry . |
WindowManager |
getWindowManager()
Get the WindowManager . |
void |
log(java.lang.String msg)
Log a message. |
static void |
main(java.lang.String[] args)
Where it all starts. |
void |
message(java.lang.String msg)
|
void |
removeLogger(Main.Logger logger)
Remove a logger. |
java.lang.Object |
restore(java.lang.String key)
Retrieve some previously stored object. |
void |
setDebugLevel(int debugLevel)
|
void |
setErr(java.io.Writer err)
Set the error output stream. |
void |
setIn(java.io.Reader in)
Set the input stream. |
void |
setOut(java.io.Writer out)
Set the output stream. |
void |
store(java.lang.String key,
java.lang.Object obj)
Store some object in a persistant manner. |
void |
warning(java.lang.String msg)
|
void |
warning(java.lang.String name,
java.lang.String msg)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Main(java.lang.String[] args, java.lang.String[] sargs) throws java.lang.Error
args
- the command-line argumentssargs
- script argsMethod Detail |
public static void main(java.lang.String[] args) throws java.lang.Throwable
args
- the command-line arguments
java.lang.Throwable
public void fatalError(java.lang.String str) throws java.lang.Error
Error
which should terminate the
thread.
str
- the error message
java.lang.Error
public void setIn(java.io.Reader in)
in
- the new input readerpublic void setOut(java.io.Writer out)
out
- the new output writerpublic void setErr(java.io.Writer err)
err
- the new error output writerpublic java.io.PrintWriter getOut()
public java.io.PrintWriter getErr()
public java.io.BufferedReader getIn()
public final WindowManager getWindowManager()
WindowManager
.
public Registry getRegistry()
Registry
.
public static void exit(int status)
System.exit(int)
, doing so may cause the VM to hang on some plat-
forms, notably windows. (The cause appears to be bad interactions
between some close runnables and swing from the context of the
shutdown-hook thread.)
status
- the exit statuspublic void atExit(java.lang.Runnable hook)
Runtime.addShutdownHook(java.lang.Thread)
for a description of what you can and can't do from a shutdown hook.
Unlike addShutdownHook
, this method lets you add a
shutdown hook from the context of a running shutdown hook.
hook
- the hook to run at shutdownpublic void store(java.lang.String key, java.lang.Object obj)
key
- the keyobj
- the object to storerestore(java.lang.String)
public java.lang.Object restore(java.lang.String key)
key
- the key
null
if nonestore(java.lang.String, java.lang.Object)
public void addLogger(Main.Logger logger)
public void removeLogger(Main.Logger logger)
public void log(java.lang.String msg)
msg
- the informational message to logpublic void setDebugLevel(int debugLevel)
public java.lang.String getHistory()
public void error(java.lang.String msg)
public void error(java.lang.String name, java.lang.String msg)
public void warning(java.lang.String msg)
public void warning(java.lang.String name, java.lang.String msg)
public void message(java.lang.String msg)
public void debug(int level, java.lang.String msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |