Package org.apache.ofbiz.base.start
Interface StartupLoader
-
- All Known Implementing Classes:
ContainerLoader
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'sload
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 thestart
method of each loader in the list. When OFBiz shuts down, a separate shutdown thread will call theunload
method of each loader. Implementations should anticipate asynchronous calls to the methods by different threads.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
load(Config config, java.util.List<StartupCommand> ofbizCommands)
Start a startup class.void
unload()
Stop the startup class.
-
-
-
Method Detail
-
load
void load(Config config, java.util.List<StartupCommand> ofbizCommands) throws StartupException
Start a startup class.- Parameters:
config
- Startup config.ofbizCommands
- Command-line arguments.- Throws:
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.
-
unload
void unload() throws StartupException
Stop the startup class. This method must not block.- Throws:
StartupException
- If an error was encountered.
-
-