Package com.codingchili.core
Class Launcher
java.lang.Object
com.codingchili.core.Launcher
- All Implemented Interfaces:
CoreDeployment
,CoreService
Launches all the components of the system on a single host. An application can be started using the
`Launcher.main(args)` or `Launcher.start(context)`. The context provides more configuration options
while the main can be used directly by passing the args from the main method.
Deploying a CoreService
can also be done using the CoreContext.service(Supplier)
methods.
To avoid the Launcher entirely, create a new SystemContext
and use the deployments method
directly on that object.
-
Constructor Summary
ConstructorDescriptionLauncher(LaunchContext context)
Creates a new launcher with the given launcher context. -
Method Summary
Modifier and TypeMethodDescriptioncontext()
static Launcher
instance()
static void
Starts the launcher with the given arguments.static void
start(LaunchContext context)
Starts the launcher with the given context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.codingchili.core.listener.CoreDeployment
init, start, stop
Methods inherited from interface com.codingchili.core.listener.CoreService
name
-
Constructor Details
-
Launcher
Creates a new launcher with the given launcher context.- Parameters:
context
- the launcher context to use.
-
-
Method Details
-
main
Starts the launcher with the given arguments.- Parameters:
args
- specifies which commands the launcher will execute.
-
start
Starts the launcher with the given context.- Parameters:
context
- contains the launcher args and settings.
-
instance
- Returns:
- the launcher that started the application, null if not started using the default Launcher.
-
context
- Returns:
- the launch context used to start the launcher, null if not started using the default launcher.
-