|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.composition.model.impl.DefaultDeploymentModel
org.apache.avalon.composition.model.impl.DefaultContainmentModel
Containment model implmentation within which composite models are aggregated as a part of a containment deployment model.
Field Summary |
Fields inherited from interface org.apache.avalon.composition.model.ContainmentModel |
KEY, SECURE_EXECUTION_KEY |
Fields inherited from interface org.apache.avalon.composition.model.DeploymentModel |
DEPLOYMENT_TIMEOUT_KEY, SEPARATOR |
Constructor Summary | |
DefaultContainmentModel(ContainmentContext context,
SecurityModel security)
Creation of a new containment model. |
Method Summary | |
void |
addCompositionListener(CompositionListener listener)
Add a composition listener to the model. |
ContainmentModel |
addContainmentModel(URL url)
Add a model referenced by a url to this model. |
ContainmentModel |
addContainmentModel(URL block,
URL config)
Addition of a new subsidiary containment model within the containment context using a supplied url. |
DeploymentModel |
addModel(DeploymentModel model)
Addition of a new subsidiary model within the containment context. |
DeploymentModel |
addModel(DeploymentProfile profile)
Addition of a new subsidiary model within the containment context using a supplied profile. |
void |
applyTargets(TargetDirective[] targets)
Apply a set of override targets. |
void |
applyTargets(URL config)
Apply a set of override targets resolvable from a supplied url. |
void |
assemble()
Assemble the model. |
void |
assemble(List subjects)
Assemble the model. |
void |
commission()
Commission the appliance. |
void |
decommission()
Decommission the appliance. |
void |
disassemble()
Disassemble the model. |
ClassLoaderModel |
getClassLoaderModel()
Return the classloader model. |
long |
getDeploymentTimeout()
Returns the maximum allowable time for deployment. |
DeploymentModel |
getModel(DependencyDescriptor dependency)
Resolve a model capable of supporting the supplied service reference. |
DeploymentModel |
getModel(ReferenceDescriptor descriptor)
Resolve a model capable of supporting the supplied service reference. |
DeploymentModel |
getModel(String path)
Return a child model relative to a supplied name. |
DeploymentModel[] |
getModels()
Return the set of immediate child models nested within this model. |
String |
getPartition()
Return the partition name established by this containment context. |
DeploymentModel[] |
getProviders()
Return the set of models assigned as providers. |
ServiceModel |
getServiceModel(Class clazz)
Return the set of service export directives for a supplied class. |
ServiceModel[] |
getServiceModels()
Return the set of service export mappings |
ServiceDescriptor[] |
getServices()
Return the set of services produced by the model. |
DeploymentModel[] |
getShutdownGraph()
Get the shutdown sequence for the model. |
DeploymentModel[] |
getStartupGraph()
Get the startup sequence for the model. |
boolean |
isaCandidate(DependencyDescriptor dependency)
Return TRUE is this model is capable of supporting a supplied depedendency. |
boolean |
isaCandidate(ReferenceDescriptor reference)
Return TRUE is this model is capable of supporting a supplied service. |
boolean |
isaCandidate(StageDescriptor stage)
Return TRUE is this model is capable of supporting a supplied stage dependency. |
boolean |
isAssembled()
Returns the assembled state of the model. |
void |
removeCompositionListener(CompositionListener listener)
Remove a composition listener from the model. |
void |
removeModel(String name)
Removal of a named model for the containment model. |
Methods inherited from class org.apache.avalon.composition.model.impl.DefaultDeploymentModel |
equals, getAccessControlContext, getCategories, getConsumerGraph, getLogger, getMode, getName, getPath, getPermissions, getProviderGraph, getQualifiedName, release, resolve, resolve, setCategories, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.avalon.composition.model.DeploymentModel |
getAccessControlContext, getCategories, getConsumerGraph, getLogger, getMode, getName, getPath, getProviderGraph, getQualifiedName, setCategories |
Methods inherited from interface org.apache.avalon.composition.model.Resolver |
release, resolve, resolve |
Constructor Detail |
public DefaultContainmentModel(ContainmentContext context, SecurityModel security) throws ModelException
context
- the containment context that establishes
the structural association of this containment model
within a parent scopeMethod Detail |
public void commission() throws Exception
commission
in interface Commissionable
commission
in class DefaultDeploymentModel
Exception
- if a commissioning error occurspublic void decommission()
decommission
in interface Commissionable
decommission
in class DefaultDeploymentModel
public ClassLoaderModel getClassLoaderModel()
getClassLoaderModel
in interface ContainmentModel
public long getDeploymentTimeout()
getDeploymentTimeout
in interface ContainmentModel
getDeploymentTimeout
in class DefaultDeploymentModel
public ServiceDescriptor[] getServices()
getServices
in interface DeploymentModel
public boolean isaCandidate(DependencyDescriptor dependency)
isaCandidate
in interface DeploymentModel
public boolean isaCandidate(ReferenceDescriptor reference)
isaCandidate
in interface DeploymentModel
reference
- the service reference descriptor
public boolean isaCandidate(StageDescriptor stage)
isaCandidate
in interface DeploymentModel
public boolean isAssembled()
isAssembled
in interface DeploymentModel
public void assemble() throws AssemblyException
assemble
in interface ContainmentModel
Exception
- if assembly cannot be fulfilled
AssemblyException
public void assemble(List subjects) throws AssemblyException
assemble
in interface ContainmentModel
subjects
- the list of deployment targets making up the assembly chain
Exception
- if an error occurs during model assembly
AssemblyException
public void disassemble()
disassemble
in interface ContainmentModel
public DeploymentModel[] getProviders()
getProviders
in interface DeploymentModel
IllegalStateException
- if the model is not in an assembled statepublic void addCompositionListener(CompositionListener listener)
addCompositionListener
in interface ContainmentModel
listener
- the composition listenerpublic void removeCompositionListener(CompositionListener listener)
removeCompositionListener
in interface ContainmentModel
listener
- the composition listenerpublic ServiceModel[] getServiceModels()
getServiceModels
in interface ContainmentModel
public ServiceModel getServiceModel(Class clazz)
getServiceModel
in interface ContainmentModel
clazz
- a cleaa identifying the directive
public DeploymentModel[] getStartupGraph()
getStartupGraph
in interface ContainmentModel
public DeploymentModel[] getShutdownGraph()
getShutdownGraph
in interface ContainmentModel
public ContainmentModel addContainmentModel(URL url) throws ModelException
addContainmentModel
in interface ContainmentModel
url
- the url of the model to include
ModelException
- if a model related error occurspublic ContainmentModel addContainmentModel(URL block, URL config) throws ModelException
ContainmentModel
addContainmentModel
in interface ContainmentModel
block
- a url referencing a containment profileconfig
- containment configuration targets
ModelException
- if an error occurs during model establishmentpublic DeploymentModel addModel(DeploymentModel model)
addModel
in interface ContainmentModel
model
- a containment or component model
public DeploymentModel addModel(DeploymentProfile profile) throws ModelException
addModel
in interface ContainmentModel
profile
- a containment or deployment profile
ModelException
- if an error occurs during model establishmentpublic void removeModel(String name) throws IllegalArgumentException
removeModel
in interface ContainmentModel
name
- the name of the subsidiary model to be removed
IllegalArgumentException
- if the supplied name is unknownpublic String getPartition()
getPartition
in interface ContainmentModel
public DeploymentModel[] getModels()
getModels
in interface ContainmentModel
public DeploymentModel getModel(String path)
getModel
in interface ContainmentModel
path
- a relative or absolute path
IllegalArgumentException
- if the name if badly formedpublic DeploymentModel getModel(ReferenceDescriptor descriptor) throws AssemblyException
getModel
in interface ContainmentModel
descriptor
- a service reference descriptor
AssemblyException
- if an assembly error occurspublic DeploymentModel getModel(DependencyDescriptor dependency) throws AssemblyException
getModel
in interface ContainmentModel
dependency
- a dependency descriptor
AssemblyException
- if an assembly error occurspublic void applyTargets(URL config) throws ModelException
applyTargets
in interface ContainmentModel
config
- a url resolvable to a TargetDirective[]
ModelException
- if an error occurspublic void applyTargets(TargetDirective[] targets)
applyTargets
in interface ContainmentModel
targets
- a set of target directives
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |