| com.jcorporate.expresso.kernel.ComponentContainer
All known Subclasses: com.jcorporate.expresso.kernel.internal.ContainerImplBase,
ComponentContainer | public interface ComponentContainer (Code) | | ContainerImpl is the equivelant of a Service Provider Interface (SPI) for
the Expresso component containers. By implementing your own ContinainerImpl
inteface, you can have its behavior 'duplicated' throughout all the other
containers. This particular behavior is specified by the ContainerFactory
class.
There is a one to one relationship between a ComponentContainer
and a Containable object. The ComponentContainer always wraps the Containable
object and the Containable object can be retrieved via the getContainercomponent()
method.
The particular ComponentContainer implementation set for each Containable
object is determined by the SystemFactory. Although it does not currently
have code to dynamically load other ComponentContainer implementations, it
would be rather simple to do so.
author: Michael Rimov since: Expresso 5.1 |
addComponent | public void addComponent(ExpressoComponent newComponent)(Code) | | To register the component for control by the Component Manager. This will
in essense transfer the control of ther service to the Component Manager.
This will often be called by the Configuration Bootstrap system.
Parameters: newComponent - the component to install |
destroyContainer | public void destroyContainer()(Code) | | Called when the container is to be destroyed
|
getChildComponents | public Map getChildComponents()(Code) | | Retrieves a list of instances of all contained ExpressoComponents. Use
this for iterating through the components of a current 'context'. Do not
attempt to modify the map given. Either add or remove a component through
the addComponent or removeComponent methods.
Read only map of the components. |
getContainerComponent | public Containable getContainerComponent()(Code) | | Return the 'wrapped' container ExpressoComponent.
Containable |
getParentContainer | public ComponentContainer getParentContainer()(Code) | | Return the parent container
ContainerImpl interface |
installComponent | public void installComponent(ExpressoComponent newComponent, InstallationOptions installOptions, InstallLog log)(Code) | | Install a component into the system. If newComponent implements
installable then it shall be installed. After that, the component
is added.
Parameters: newComponent - An instance of the component to install. Parameters: log - a Logger-like interface to a component tha records the processof the installation including any errors, etc. Parameters: installOptions - The Installation Options for the Component |
isComponentExists | public boolean isComponentExists(String componentName)(Code) | | Query the container to see if a particular service name is installed
in the system
Parameters: componentName - the name of the component to query for. true if the service is installed and running. |
locateComponent | public ExpressoComponent locateComponent(String componentName)(Code) | | Locates an Expresso Service for use by a client.
Parameters: componentName - the name of the service to locate. ExpressoService. throws: IllegalArgumentException - if the service cannot be found. throws: IllegalStateException - if the service exists, but is not in a'runnable' state due to some configuration error or other unforeseenissue. |
removeComponent | public void removeComponent(String componentName)(Code) | | Removes a component from this container.
Parameters: componentName - The name of the component to remove. |
setContainerComponent | public void setContainerComponent(Containable newComponent)(Code) | | Sets the nested component. This is usually called by the system
factory.
Parameters: newComponent - the component links to this component containerobject. |
setParentContainer | public void setParentContainer(ComponentContainer newParent)(Code) | | Set the parent container of this container
Parameters: newParent - the new Parent Container |
uninstallComponent | public void uninstallComponent(String componentName, InstallationOptions installOptions, InstallLog log)(Code) | | Uninstalls the component. If the component implements
installable then it shall be uninstalled. After that, it shall
be removed.
Parameters: componentName - the name of the component to uninstall Parameters: log - a Logger-like interface to a component tha records the processof the installation including any errors, etc. Parameters: installOptions - The 'Uninstallation' options for the component |
|
|