org.apache.avalon.activation.appliance
Interface Home

All Known Subinterfaces:
Appliance, Block, Kernel, LifestyleHandler
All Known Implementing Classes:
AbstractAppliance, AbstractLifestyleHandler, DefaultBlock, DefaultKernel

public interface Home

The Home interface defines the contract for instance access and release. A client of a home aquires object references by checking-out an instance by passing itself as a check-out token. When a client no-longer requires the instance it release the instance along by supplying itself as the identifiable consumer.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/09/10 08:54:56 $
Author:
Avalon Development Team

Method Summary
 void release(Object source, Object instance)
          Release an object
 Object resolve(Object source)
          Resolve a object to a value.
 Object resolve(Object source, Class[] ref)
          Resolve a object to a value relative to a supplied set of interface classes.
 

Method Detail

resolve

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

Parameters:
source - the context within the the resolution is applied
Returns:
the resolved object
Throws:
Exception - if an error occurs

resolve

public Object resolve(Object source,
                      Class[] ref)
               throws Exception
Resolve a object to a value relative to a supplied set of interface classes.

Parameters:
source - the aquiring source
ref - the castable service classes
Returns:
the resolved object
Throws:
Exception - if an error occurs

release

public void release(Object source,
                    Object instance)
Release an object

Parameters:
source - the client that obtained the intial reference
instance - the object to be released


Copyright © Apache Software Foundation. All Rights Reserved.