Package com.bc.ceres.core.runtime
Interface ModuleRuntime
-
- All Superinterfaces:
Extensible
,ModuleContext
public interface ModuleRuntime extends ModuleContext
A runtime for applications composed of multiple modules.A module runtime is configured through a
RuntimeConfig
.The
ModuleContext.getModule()
method implemented of aModuleRuntime
returns the system module.This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getCommandLineArgs()
Gets the command line arguments passed to this runtime.void
start()
Starts the Ceres runtime.void
stop()
Explicitely stops all modules and finally stops this Ceres runtime.-
Methods inherited from interface com.bc.ceres.core.Extensible
getExtension
-
Methods inherited from interface com.bc.ceres.core.runtime.ModuleContext
getLogger, getModule, getModule, getModules, getRuntimeConfig, installModule
-
-
-
-
Method Detail
-
getCommandLineArgs
String[] getCommandLineArgs()
Gets the command line arguments passed to this runtime.- Returns:
- the command line arguments
-
start
void start() throws CoreException
Starts the Ceres runtime. This implies the following steps:- determine the runtime's
home
andconfig
file locations, - if exists, load
config.properties
from theconfig
location and add its properties to the system settings, - determine the runtime's
lib
andmodules
file locations, - scan the
lib
location for implicite JARs, - scan the
modules
location for modules, - initialize the system module,
- resolve all modules,
- start all modules,
- register this runtime's
stop()
method as a shutdown hook to the VM, - start an optional application, which is a
RuntimeRunnable
registered with theceres-core:applications
extension point.
- Throws:
CoreException
- if an error in the runtime occurs- See Also:
Runtime.addShutdownHook(Thread)
,stop()
- determine the runtime's
-
stop
void stop() throws CoreException
Explicitely stops all modules and finally stops this Ceres runtime. Note that this method is also registered as a shutdown hook to the VM duringstart()
.- Throws:
CoreException
- if an error in the runtime occurs- See Also:
start()
-
-