public static interface SeBootstrap.Instance
Modifier and Type | Interface and Description |
---|---|
static interface |
SeBootstrap.Instance.StopResult
Result of stopping the application instance.
|
Modifier and Type | Method and Description |
---|---|
SeBootstrap.Configuration |
configuration()
Provides access to the configuration actually used by the implementation used to create this instance.
|
java.util.concurrent.CompletionStage<SeBootstrap.Instance.StopResult> |
stop()
Initiate immediate shutdown of running application instance.
|
default void |
stopOnShutdown(java.util.function.Consumer<SeBootstrap.Instance.StopResult> consumer)
Registers a consumer for a
SeBootstrap.Instance.StopResult which will be executed in a new thread
during the JVM shutdown phase. |
<T> T |
unwrap(java.lang.Class<T> nativeClass)
Provides access to the wrapped native handle of the application instance.
|
SeBootstrap.Configuration configuration()
This may, or may not, be the same instance passed to SeBootstrap.start(Application, Configuration)
, not even an
equal instance, as implementations MAY create a new intance and MUST update at least the PORT
property with
the actually used value. Portable applications should not make any assumptions but always explicitly read the actual
values from the configuration returned from this method.
java.util.concurrent.CompletionStage<SeBootstrap.Instance.StopResult> stop()
CompletionStage
asynchronously shutting down this application instance.<T> T unwrap(java.lang.Class<T> nativeClass)
Implementations may, or may not, have native handles. Portable applications should not invoke this method, as the outcome is undefined.
T
- Requested type of the native handle to return.nativeClass
- Requested type of the native handle to return.null
if the implementation has no native handle.java.lang.ClassCastException
- if the handle is not null
and is not assignable to the type T
.default void stopOnShutdown(java.util.function.Consumer<SeBootstrap.Instance.StopResult> consumer)
SeBootstrap.Instance.StopResult
which will be executed in a new thread
during the JVM shutdown phase.consumer
- The consumer.