public abstract class EntryPoint extends Object implements Runnable
It's purpose is to consistently apply our completion logic of forcing the JVM to exit at a certain point instead of waiting for all threads to die, and to provide some consistent unhandled exception catching.
Entry points may be nested, as is the case when a foreground daemon is started.
The createCompleter() and createErrorHandler() are not really intended to be overridden by subclasses as they define our entry point behaviour, but they are protected to enable testing as it's difficult to test something that will call System.exit().
| Constructor and Description |
|---|
EntryPoint() |
| Modifier and Type | Method and Description |
|---|---|
protected ExecutionCompleter |
createCompleter() |
protected Action<Throwable> |
createErrorHandler() |
protected abstract void |
doAction(ExecutionListener listener) |
void |
run()
Unless the createCompleter() method is overridden, the JVM will exit before returning from this method.
|
public void run()
protected ExecutionCompleter createCompleter()
protected abstract void doAction(ExecutionListener listener)
Copyright © 2013. All rights reserved