public class Seed extends Object
Modifier and Type | Method and Description |
---|---|
static Coffig |
baseConfiguration()
Provides the application base configuration (i.e.
|
static void |
close()
Explicitly cleanup SeedStack global state.
|
static io.nuun.kernel.api.Kernel |
createKernel()
Create and start a basic kernel without specifying a runtime context, nor a configuration.
|
static io.nuun.kernel.api.Kernel |
createKernel(Object runtimeContext,
io.nuun.kernel.api.config.KernelConfiguration kernelConfiguration,
boolean autoStart)
Create, initialize and optionally start a kernel with the specified runtime context and configuration.
|
static DiagnosticManager |
diagnostic()
Provides the default
DiagnosticManager instance to dump diagnostics outside a running kernel. |
static void |
disableLogs()
Disable logs globally if a supported SLF4J implementation is used.
|
static void |
disposeKernel(io.nuun.kernel.api.Kernel kernel)
Stops and dispose a running
Kernel instance. |
static SeedLauncher |
getLauncher()
Discover implementations of
SeedLauncher through the ServiceLoader mechanism and if exactly one
implementation is available, returns it. |
static SeedLauncher |
getToolLauncher(String toolName)
Returns an instance of the
ToolLauncher configured for the specified tool. |
static boolean |
hasLifecycleExceptionHandler()
Returns if a global exception handler for startup and shutdown is present or not.
|
static void |
refresh() |
static BaseException |
translateException(Exception exception)
Translates any exception that occurred in the application using an extensible exception mechanism.
|
public static boolean hasLifecycleExceptionHandler()
public static void disableLogs()
public static SeedLauncher getLauncher()
SeedLauncher
through the ServiceLoader
mechanism and if exactly one
implementation is available, returns it. Otherwise, throws an exception.SeedLauncher
implementation.public static SeedLauncher getToolLauncher(String toolName)
ToolLauncher
configured for the specified tool.toolName
- the tool to execute.ToolLauncher
instance.public static DiagnosticManager diagnostic()
DiagnosticManager
instance to dump diagnostics outside a running kernel.public static BaseException translateException(Exception exception)
exception
- the exception to handle.public static Coffig baseConfiguration()
Cannot be called from SeedInitializer
methods.
Coffig
object for application base configuration.public static io.nuun.kernel.api.Kernel createKernel()
Cannot be called from SeedInitializer
methods.
Kernel
instance.public static io.nuun.kernel.api.Kernel createKernel(Object runtimeContext, io.nuun.kernel.api.config.KernelConfiguration kernelConfiguration, boolean autoStart)
Cannot be called from SeedInitializer
methods.
runtimeContext
- the runtime context object, which will be accessible from plugins.kernelConfiguration
- the kernel configuration.autoStart
- if true, the kernel is started automatically.Kernel
instance.public static void disposeKernel(io.nuun.kernel.api.Kernel kernel)
kernel
- the kernel to dispose.public static void close()
Has no effect if called from SeedInitializer
methods or after the first call.
public static void refresh()
Copyright © 2013-2018–2019 SeedStack. All rights reserved.