org.apache.avalon.activation.appliance.impl
Class DefaultAppliance

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.activation.appliance.impl.AbstractAppliance
          extended byorg.apache.avalon.activation.appliance.impl.DefaultAppliance
All Implemented Interfaces:
Appliance, Composite, DefaultApplianceMBean, Deployable, Disposable, Home, LogEnabled

public class DefaultAppliance
extends AbstractAppliance
implements Composite, DefaultApplianceMBean

DefaultAppliance is the default implementation of a local appliance instance.

Version:
$Revision: 1.15.4.1 $ $Date: 2004/01/09 15:07:58 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.avalon.activation.appliance.Appliance
MBEAN_SERVER_KEY
 
Constructor Summary
DefaultAppliance(Logger logger, ServiceContext context, DeploymentModel model, Engine engine)
           
 
Method Summary
 void assemble()
          Assemble the appliance.
 void decommission()
          Decommission the block.
 void deploy()
          Deploy the appliance during which deployment phase artifacts such as logging channels, contextualization handlers and so on are established in preparation for component creation requests.
 void disassemble()
          Disassemble the appliance.
 void dispose()
           
 Appliance[] getProviders()
          Return the set of appliances assigned as deployment and runtime providers.
 boolean isAssembled()
          Returns the assembled state of the appliance.
 void release(Object instance)
          Release an object.
 Object resolve()
          Resolve a object to a value.
 
Methods inherited from class org.apache.avalon.activation.appliance.impl.AbstractAppliance
getModel, isEnabled, toString
 
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
 

Constructor Detail

DefaultAppliance

public DefaultAppliance(Logger logger,
                        ServiceContext context,
                        DeploymentModel model,
                        Engine engine)
Method Detail

isAssembled

public boolean isAssembled()
Returns the assembled state of the appliance.

Specified by:
isAssembled in interface Composite
Returns:
true if this appliance is assembled

assemble

public void assemble()
              throws AssemblyException
Assemble the appliance.

Specified by:
assemble in interface Composite
Throws:
ApplianceException - if an error occurs during appliance assembly
AssemblyException

disassemble

public void disassemble()
Disassemble the appliance.

Specified by:
disassemble in interface Composite

getProviders

public Appliance[] getProviders()
Return the set of appliances assigned as deployment and runtime providers.

Specified by:
getProviders in interface Composite
Returns:
the extenernal providers consumed by the appliance
Throws:
IllegalStateException - if invoked prior to the completion of the assembly phase

deploy

public void deploy()
            throws Exception
Deploy the appliance during which deployment phase artifacts such as logging channels, contextualization handlers and so on are established in preparation for component creation requests. If the deployment policy is startup, an initial instance of a component will be deployed.

Specified by:
deploy in interface Deployable
Throws:
Exception - if a deployment error occurs

decommission

public void decommission()
Decommission the block. Under the decommissioning phase, all active components will be taken down.

Specified by:
decommission in interface Deployable

resolve

public Object resolve()
               throws Exception
Resolve a object to a value.

Specified by:
resolve in interface Home
Returns:
the resolved object
Throws:
Exception - if an error occurs

release

public void release(Object instance)
Release an object.

Specified by:
release in interface Home
Parameters:
instance - the object to be released

dispose

public void dispose()
Specified by:
dispose in interface Disposable
Overrides:
dispose in class AbstractAppliance


Copyright © Apache Software Foundation. All Rights Reserved.