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 aModuleRuntimereturns 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.voidstart()Starts the Ceres runtime.voidstop()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 CoreExceptionStarts the Ceres runtime. This implies the following steps:- determine the runtime's
homeandconfigfile locations, - if exists, load
config.propertiesfrom theconfiglocation and add its properties to the system settings, - determine the runtime's
libandmodulesfile locations, - scan the
liblocation for implicite JARs, - scan the
moduleslocation 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
RuntimeRunnableregistered with theceres-core:applicationsextension 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()
-
-