Interface StartupLoader

  • All Known Implementing Classes:

    public interface StartupLoader
    An object that loads server startup classes.

    When OFBiz starts, the main thread will create the StartupLoader instance and then call the loader's load method. If the method returns without throwing an exception the loader will be added to a list of initialized loaders. After all instances have been created and initialized, the main thread will call the start method of each loader in the list. When OFBiz shuts down, a separate shutdown thread will call the unload method of each loader. Implementations should anticipate asynchronous calls to the methods by different threads.

    • Method Detail

      • load

        void load​(Config config,
                  java.util.List<StartupCommand> ofbizCommands)
           throws StartupException
        Start a startup class.
        config - Startup config.
        ofbizCommands - Command-line arguments.
        StartupException - If an error was encountered. Throwing this exception will halt loader loading, so it should be thrown only when OFBiz can't operate without it.