|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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.
| Method Summary | |
void |
addComponent(ExpressoComponent newComponent)
To register the component for control by the Component Manager. |
void |
destroyContainer()
Called when the container is to be destroyed |
Map |
getChildComponents()
Retrieves a list of instances of all contained ExpressoComponents. |
Containable |
getContainerComponent()
Return the 'wrapped' container ExpressoComponent. |
ComponentContainer |
getParentContainer()
Return the parent container |
void |
installComponent(ExpressoComponent newComponent,
InstallationOptions installOptions,
InstallLog log)
Install a component into the system. |
boolean |
isComponentExists(String componentName)
Query the container to see if a particular service name is installed in the system |
ExpressoComponent |
locateComponent(String componentName)
Locates an Expresso Service for use by a client. |
void |
removeComponent(String componentName)
Removes a component from this container. |
void |
setContainerComponent(Containable newComponent)
Sets the nested component. |
void |
setParentContainer(ComponentContainer newParent)
Set the parent container of this container |
void |
uninstallComponent(String componentName,
InstallationOptions installOptions,
InstallLog log)
Uninstalls the component. |
| Method Detail |
public ExpressoComponent locateComponent(String componentName)
componentName - the name of the service to locate.
IllegalArgumentException - if the service cannot be found.
IllegalStateException - if the service exists, but is not in a
'runnable' state due to some configuration error or other unforeseen
issue.public boolean isComponentExists(String componentName)
componentName - the name of the component to query for.
public void addComponent(ExpressoComponent newComponent)
newComponent - the component to installpublic void removeComponent(String componentName)
componentName - The name of the component to remove.
public void installComponent(ExpressoComponent newComponent,
InstallationOptions installOptions,
InstallLog log)
installable then it shall be installed. After that, the component
is added.
newComponent - An instance of the component to install.log - a Logger-like interface to a component tha records the process
of the installation including any errors, etc.installOptions - The Installation Options for the Component
public void uninstallComponent(String componentName,
InstallationOptions installOptions,
InstallLog log)
installable then it shall be uninstalled. After that, it shall
be removed.
componentName - the name of the component to uninstalllog - a Logger-like interface to a component tha records the process
of the installation including any errors, etc.installOptions - The 'Uninstallation' options for the componentpublic Map getChildComponents()
public ComponentContainer getParentContainer()
public void setParentContainer(ComponentContainer newParent)
newParent - the new Parent Containerpublic Containable getContainerComponent()
Containablepublic void setContainerComponent(Containable newComponent)
newComponent - the component links to this component container
object.public void destroyContainer()
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||