|
|||||||||||
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.DefaultBlock
The DefaultBlock 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 context,
ContainmentModel model)
Create a root containment block. |
void |
decommission()
Decommission the block. |
void |
deploy()
Deploy the appliance. |
void |
disassemble()
Disassemble the appliance. |
void |
dispose()
|
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. |
void |
release(Object source,
Object instance)
Release an object |
Object |
resolve(Object consumer)
Resolve a object to a value. |
Object |
resolve(Object source,
Class[] ref)
Resolve a object to a value qualified by a supplied service reference. |
Appliance |
resolveAppliance(DependencyDescriptor dependency)
Return an appliance relative to a supplied dependency descriptor. |
Appliance |
resolveAppliance(DependencyModel dependency)
Return an appliance relative to a supplied dependency model. |
Appliance |
resolveAppliance(StageDescriptor stage)
Return an appliance relative to a supplied stage descriptor. |
Appliance |
resolveAppliance(StageModel stage)
Return an appliance relative to a supplied stage model. |
Appliance |
resolveAppliance(String source)
Return an appliance relative to a specific path. |
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 context, ContainmentModel model) throws Exception
context
- the service contextmodel
- the root containment model
Exception
public Appliance resolveAppliance(DependencyModel dependency) throws Exception
resolveAppliance
in interface Engine
dependency
- the dependency model
Exception
public Appliance resolveAppliance(DependencyDescriptor dependency) throws Exception
resolveAppliance
in interface Engine
dependency
- the dependency descriptor
NoProviderDefinitionException
- if no provider an be found
for the supplied dependency
Exception
- if an error occurspublic Appliance resolveAppliance(StageModel stage) throws Exception
resolveAppliance
in interface Engine
stage
- the stage model
Exception
public Appliance resolveAppliance(StageDescriptor stage) throws NoProviderDefinitionException, Exception
resolveAppliance
in interface Engine
stage
- the stage descriptor
NoProviderDefinitionException
- if no provider an be found
for the supplied stage
Exception
- if an error occurspublic Appliance resolveAppliance(String source) throws Exception
resolveAppliance
in interface Engine
source
- the appliance path
Exception
- if an error occurspublic 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 Object resolve(Object consumer) throws Exception
resolve
in interface Home
consumer
- the consumer
Exception
- if an error occurspublic Object resolve(Object source, Class[] ref) throws Exception
resolve
in interface Home
source
- the context within the the resolution is appliedref
- the requested service interfaces
Exception
- if an error occurspublic void release(Object source, Object instance)
release
in interface Home
source
- the client that obtained the intial referenceinstance
- 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 |