org.apache.avalon.activation.impl
Class DefaultAppliance

java.lang.Object
  extended byorg.apache.avalon.activation.impl.AbstractAppliance
      extended byorg.apache.avalon.activation.impl.DefaultAppliance
All Implemented Interfaces:
Appliance, Commissionable, Resolver

public class DefaultAppliance
extends AbstractAppliance

Abstract appliance.

Version:
$Revision: 1.7 $ $Date: 2004/03/17 10:30:07 $
Author:
Avalon Development Team

Constructor Summary
DefaultAppliance(ComponentModel model, LifestyleManager lifestyle, boolean secure)
           
 
Method Summary
 void commission()
          Commission the appliance.
 void decommission()
          Decommission the appliance.
protected  ComponentModel getComponentModel()
          Return the model backing the handler.
 void release(Object instance)
          Release an object
 Object resolve()
          Resolve a object to a value.
 Object resolve(boolean proxy)
          Request resolution of an object from the runtime.
 String toString()
           
 
Methods inherited from class org.apache.avalon.activation.impl.AbstractAppliance
getDeploymentModel, getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultAppliance

public DefaultAppliance(ComponentModel model,
                        LifestyleManager lifestyle,
                        boolean secure)
Method Detail

commission

public void commission()
                throws Exception
Commission the appliance.

Specified by:
commission in interface Commissionable
Specified by:
commission in class AbstractAppliance
Throws:
Exception - if a commissioning error occurs

decommission

public void decommission()
Decommission the appliance. Once an appliance is decommissioned it may be re-commissioned.

Specified by:
decommission in interface Commissionable
Specified by:
decommission in class AbstractAppliance

resolve

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

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

resolve

public Object resolve(boolean proxy)
               throws Exception
Description copied from class: AbstractAppliance
Request resolution of an object from the runtime.

Specified by:
resolve in interface Resolver
Specified by:
resolve in class AbstractAppliance
Parameters:
proxy - if TRUE the return value will be proxied if the underlying component typoe suppports proxy representation
Throws:
Exception - if a deployment error occurs

release

public void release(Object instance)
Release an object

Specified by:
release in interface Resolver
Specified by:
release in class AbstractAppliance
Parameters:
instance - the object to be released

getComponentModel

protected ComponentModel getComponentModel()
Return the model backing the handler.

Returns:
the type that the appliance is managing

toString

public String toString()
Overrides:
toString in class AbstractAppliance


Copyright © The Apache Software Foundation. All Rights Reserved.