- Enclosing interface:
- SeBootstrap
public static interface SeBootstrap.Instance
Handle of the running application instance.
- Since:
- 3.1
- Author:
- Markus KARG (markus@headcrashing.eu)
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Result of stopping the application instance. -
Method Summary
Modifier and TypeMethodDescriptionProvides access to the configuration actually used by the implementation used to create this instance.stop()
Initiate immediate shutdown of running application instance.default void
Registers a consumer for aSeBootstrap.Instance.StopResult
which will be executed in a new thread during the JVM shutdown phase.<T> T
Provides access to the wrapped native handle of the application instance.
-
Method Details
-
configuration
SeBootstrap.Configuration configuration()Provides access to the configuration actually used by the implementation used to create this instance.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 thePORT
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.- Returns:
- The configuration actually used to create this instance.
- Since:
- 3.1
-
stop
Initiate immediate shutdown of running application instance.- Returns:
CompletionStage
asynchronously shutting down this application instance.- Since:
- 3.1
-
unwrap
Provides access to the wrapped native handle of the application instance.Implementations may, or may not, have native handles. Portable applications should not invoke this method, as the outcome is undefined.
- Type Parameters:
T
- Requested type of the native handle to return.- Parameters:
nativeClass
- Requested type of the native handle to return.- Returns:
- Native handle of the running application instance or
null
if the implementation has no native handle. - Throws:
ClassCastException
- if the handle is notnull
and is not assignable to the typeT
.- Since:
- 3.1
-
stopOnShutdown
Registers a consumer for aSeBootstrap.Instance.StopResult
which will be executed in a new thread during the JVM shutdown phase.- Parameters:
consumer
- The consumer.- Since:
- 3.1
-