|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.activation.appliance.impl.AbstractAppliance
org.apache.avalon.activation.appliance.impl.AbstractBlock
The AbstractBlock is responsible for the management of the assembly of the subsidiary appliances, the coordination of the deployment, decommissioning and eventual dissassembly of contained appliances, and the overall management of a containment context.
Field Summary |
Fields inherited from interface org.apache.avalon.activation.appliance.Appliance |
MBEAN_SERVER_KEY |
Method Summary | |
void |
assemble()
Assemble the appliance. |
Appliance |
createAppliance(Model model)
Create a new appliance. |
static Block |
createRootBlock(ServiceContext services,
ContainmentModel model)
Create a root containment block. |
void |
decommission()
Decommission the block. |
void |
deploy()
Deploy the appliance. |
void |
disassemble()
Disassemble the appliance. |
void |
dispose()
|
ContainmentModel |
getContainmentModel()
Return the containment metamodel associated with the block. |
Appliance[] |
getProviders()
Returns the set of appliances instances that provide services to the set of appliances managed by this container. |
boolean |
isAssembled()
Returns the assembled state of the appliance. |
Appliance |
locate(DependencyDescriptor dependency)
Return an appliance relative to a supplied dependency descriptor. |
Appliance |
locate(DependencyModel dependency)
Return an appliance relative to a supplied dependency model. |
Appliance |
locate(StageDescriptor stage)
Return an appliance relative to a supplied stage descriptor. |
Appliance |
locate(StageModel stage)
Return an appliance relative to a supplied stage model. |
Appliance |
locate(String source)
Return an appliance relative to a specific path. |
void |
modelAdded(CompositionEvent event)
Notify the listener that a model has been added to a source containment model. |
void |
modelRemoved(CompositionEvent event)
Notify the listener that a model has been removed from a source containment model. |
abstract void |
release(Object instance)
Release an object |
abstract Object |
resolve()
Resolve a object to a value. |
String |
toString()
|
Methods inherited from class org.apache.avalon.activation.appliance.impl.AbstractAppliance |
getModel, isEnabled |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.avalon.activation.appliance.Appliance |
getModel, isEnabled |
Method Detail |
public static Block createRootBlock(ServiceContext services, ContainmentModel model) throws Exception
services
- the service contextmodel
- the root containment model
Exception
public ContainmentModel getContainmentModel()
getContainmentModel
in interface Block
public void modelAdded(CompositionEvent event)
modelAdded
in interface CompositionEventListener
event
- the containment event raised by the
source containment modelpublic void modelRemoved(CompositionEvent event)
modelRemoved
in interface CompositionEventListener
event
- the containment event raised by the
source containment modelpublic Appliance locate(DependencyModel dependency) throws NoProviderDefinitionException, ApplianceException
locate
in interface Engine
dependency
- the dependency model
NoProviderDefinitionException
- if no provider an be found
for the supplied dependency
ApplianceException
- if an error occurs during appliance
resolutionpublic Appliance locate(DependencyDescriptor dependency) throws NoProviderDefinitionException, ApplianceException
locate
in interface Engine
dependency
- the dependency descriptor
NoProviderDefinitionException
- if no provider an be found
for the supplied dependency
ApplianceException
- if an error occurs during appliance
resolutionpublic Appliance locate(StageModel stage) throws NoProviderDefinitionException, ApplianceException
locate
in interface Engine
stage
- the stage model
NoProviderDefinitionException
- if no provider an be found
for the supplied stage
ApplianceException
- if an error occurs during appliance
resolutionpublic Appliance locate(StageDescriptor stage) throws NoProviderDefinitionException, ApplianceException
locate
in interface Engine
stage
- the stage descriptor
NoProviderDefinitionException
- if no provider an be found
for the supplied stage
ApplianceException
- if an error occurs during appliance
resolution
Exception
- if an error occurspublic Appliance locate(String source) throws IllegalArgumentException, ApplianceException
locate
in interface Engine
source
- the appliance path
IllegalArgumentException
- if the supplied path is invalid
ApplianceException
- if an error occurs during appliance
resolutionpublic boolean isAssembled()
isAssembled
in interface Composite
public void assemble() throws AssemblyException
assemble
in interface Composite
ApplianceException
- if an error occurs during
appliance assembly
AssemblyException
public void disassemble()
disassemble
in interface Composite
public Appliance[] getProviders()
getProviders
in interface Composite
public void deploy() throws Exception
deploy
in interface Deployable
Exception
- if a deployment error occurspublic void decommission()
decommission
in interface Deployable
public abstract Object resolve() throws Exception
resolve
in interface Home
Exception
- if an error occurspublic abstract void release(Object instance)
release
in interface Home
instance
- the object to be releasedpublic void dispose()
dispose
in interface Disposable
dispose
in class AbstractAppliance
public Appliance createAppliance(Model model) throws ApplianceException
model
- the component model
ApplianceException
public String toString()
toString
in class AbstractAppliance
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |