|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.runtime.swing.application.ApplicationRunner
public abstract class ApplicationRunner
Simple application runner which authorize to reload an application.
| Field Summary | |
|---|---|
protected String[] |
args
arguments given to runner at launch time |
protected Exception |
error
|
protected Thread |
mainThread
|
protected boolean |
reload
flag to reload the runner when closing it |
protected Runnable |
runnable
the runner to start application |
protected long |
startingTime
|
| Constructor Summary | |
|---|---|
protected |
ApplicationRunner(String[] args)
|
| Method Summary | |
|---|---|
void |
close()
|
static ApplicationRunner |
getRunner()
|
protected abstract void |
initOnce()
To execute some code only once. |
boolean |
isReload()
|
void |
launch()
|
static void |
lock()
|
protected abstract void |
onClose(boolean reload)
Hook to close runner. |
protected abstract void |
onError(Exception e)
Hook when an error occurs in runner. |
protected abstract void |
onInit()
Hook to init runner. |
protected abstract void |
onShutdown()
Hook to shutdown launcher |
protected abstract void |
onShutdown(Exception ex)
Hook to shutdown launcher when an exception occurs on clsoing. |
protected abstract void |
onStart()
Hook to start runner. |
void |
setReload(boolean reload)
|
static void |
unlock()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final String[] args
protected boolean reload
protected final Runnable runnable
protected long startingTime
protected Exception error
protected Thread mainThread
| Constructor Detail |
|---|
protected ApplicationRunner(String[] args)
| Method Detail |
|---|
public static ApplicationRunner getRunner()
public static void lock()
throws InterruptedException
InterruptedExceptionpublic static void unlock()
protected abstract void initOnce()
protected abstract void onInit()
throws Exception
Exception - if any problem
protected abstract void onStart()
throws Exception
Exception - if any problem
protected abstract void onClose(boolean reload)
throws Exception
reload - if reload was asked
Exception - if any problme
protected abstract void onShutdown()
throws Exception
Exception - if any problemprotected abstract void onShutdown(Exception ex)
ex - the error catched while closing launcherprotected abstract void onError(Exception e)
e - the error catchedpublic boolean isReload()
public void setReload(boolean reload)
public final void launch()
public final void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||