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 a ModuleRuntime returns the system module.

    This interface is not intended to be implemented by clients.

    • 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:
        1. determine the runtime's home and config file locations,
        2. if exists, load config.properties from the config location and add its properties to the system settings,
        3. determine the runtime's lib and modules file locations,
        4. scan the lib location for implicite JARs,
        5. scan the modules location for modules,
        6. initialize the system module,
        7. resolve all modules,
        8. start all modules,
        9. register this runtime's stop() method as a shutdown hook to the VM,
        10. start an optional application, which is a RuntimeRunnable registered with the ceres-core:applications extension point.
        Throws:
        CoreException - if an error in the runtime occurs
        See Also:
        Runtime.addShutdownHook(Thread), stop()
      • 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 during start().
        Throws:
        CoreException - if an error in the runtime occurs
        See Also:
        start()