Class Lifecycle
java.lang.Object
ch.raffael.meldioc.library.base.lifecycle.Lifecycle
A helper class to manage context lifecycle with features supporting
applications.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classfinal classclassfinal class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasApplication(io.vavr.control.Option<? extends org.slf4j.Logger> log) asApplication(org.slf4j.Logger log) exitOnError(int exitCode) log(org.slf4j.Logger log) static ShutdownController.Actuatorstatic Lifecycleof(Lifecycle.Feature lifecycleFeature) static Lifecycleof(WorkExecutorFeature threadingFeature, StartupActions.Feature startupActionsFeature, ShutdownFeature.WithActuator shutdownFeature) static Lifecycleof(Supplier<? extends Executor> executor, StartupActions.Feature startupActionsFeature, ShutdownFeature.WithActuator shutdownFeature) static Lifecycleof(Supplier<? extends Executor> executor, Supplier<? extends io.vavr.collection.Traversable<? extends io.vavr.CheckedRunnable>> startupActions, Supplier<? extends ShutdownController.Actuator> shutdownActuator) onError(Consumer<? super Lifecycle.StartupError> onError) onSuccess(Consumer<? super Lifecycle.StartupSuccess> onSuccess) io.vavr.collection.Seq<Throwable>shutdown()start()start(long timeoutSeconds)
-
Constructor Details
-
Lifecycle
-
-
Method Details
-
of
-
of
public static Lifecycle of(Supplier<? extends Executor> executor, StartupActions.Feature startupActionsFeature, ShutdownFeature.WithActuator shutdownFeature) -
of
public static Lifecycle of(WorkExecutorFeature threadingFeature, StartupActions.Feature startupActionsFeature, ShutdownFeature.WithActuator shutdownFeature) -
of
-
nullShutdownActuator
-
onSuccess
-
onError
-
log
-
asApplication
-
asApplication
-
shutdownHook
-
exitOnError
-
exitOnError
-
start
-
start
-
start
-
shutdown
- Throws:
InterruptedException
-