Package org.apache.ofbiz.base.container
Class ComponentContainer
- java.lang.Object
-
- org.apache.ofbiz.base.container.ComponentContainer
-
- All Implemented Interfaces:
Container
public class ComponentContainer extends java.lang.Object implements Container
ComponentContainer - StartupContainer implementation for Components The purpose of this container is to load the classpath for all components defined in OFBiz. This container must run before any other containers to allow components to access any necessary resources. Furthermore, the ComponentContainer also builds up theComponentConfigCache
defined inComponentConfig
to keep track of loaded components
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Constructor Summary
Constructors Constructor Description ComponentContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Return the container name.void
init(java.util.List<StartupCommand> ofbizCommands, java.lang.String name, java.lang.String configFile)
Initialize the container.boolean
start()
Start the container process.void
stop()
Stop the container process.
-
-
-
Method Detail
-
init
public void init(java.util.List<StartupCommand> ofbizCommands, java.lang.String name, java.lang.String configFile) throws ContainerException
Description copied from interface:Container
Initialize the container. This method must not block - implementations should initialize internal structures and then return.- Specified by:
init
in interfaceContainer
- Parameters:
ofbizCommands
- Command-line arguments.name
- Unique name of the container's instance.configFile
- Location of the configuration file used to load this container.- Throws:
ContainerException
- If an error was encountered. Throwing this exception will halt container loading, so it should be thrown only when other containers might depend on this one.
-
start
public boolean start() throws ContainerException
Description copied from interface:Container
Start the container process. This method must not block - implementations that require thread blocking must create a separate thread and then return.- Specified by:
start
in interfaceContainer
- Returns:
true
if the process started.- Throws:
ContainerException
- If an error was encountered.- See Also:
Container.start()
-
stop
public void stop() throws ContainerException
Description copied from interface:Container
Stop the container process. This method must not block.- Specified by:
stop
in interfaceContainer
- Throws:
ContainerException
- If an error was encountered.- See Also:
Container.stop()
-
-