org.apache.avalon.fortress.impl.handler
Class LEAwareComponentHandler

java.lang.Object
  extended byorg.apache.avalon.fortress.impl.handler.LEAwareComponentHandler
All Implemented Interfaces:
ComponentHandler, Disposable

public final class LEAwareComponentHandler
extends java.lang.Object
implements ComponentHandler, Disposable

A ComponentHandler that delegates to underlying handler but also calls relevent Lifecycle Extension handlers at the right time.

Version:
CVS $Revision: 1.18 $ $Date: 2004/02/28 15:16:25 $
Author:
Avalon Development Team

Constructor Summary
LEAwareComponentHandler(ComponentHandler componentHandler, LifecycleExtensionManager extManager, Context context)
          Creation of a new handler.
 
Method Summary
 void dispose()
          Disposal of the handler.
 java.lang.Object get()
          Retrieve the object and execute access extensions.
 java.lang.Class getComponentClass()
          Return the component's class that this handler is trying to create.
 void prepareHandler()
          Prepare the handler.
 void put(java.lang.Object component)
          Return component and execute Release extensions.
 java.lang.String toString()
          Human readable string message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LEAwareComponentHandler

public LEAwareComponentHandler(ComponentHandler componentHandler,
                               LifecycleExtensionManager extManager,
                               Context context)
Creation of a new handler.

Parameters:
componentHandler - the handler
extManager - the extension manager
context - the context
Method Detail

getComponentClass

public java.lang.Class getComponentClass()
Return the component's class that this handler is trying to create. Used for deubug information.

Specified by:
getComponentClass in interface ComponentHandler
Returns:
the Class object for the component

prepareHandler

public void prepareHandler()
                    throws java.lang.Exception
Prepare the handler.

Specified by:
prepareHandler in interface ComponentHandler
Throws:
java.lang.Exception - if a handler preparation error occurs

get

public java.lang.Object get()
                     throws java.lang.Exception
Retrieve the object and execute access extensions.

Specified by:
get in interface ComponentHandler
Returns:
the object
Throws:
java.lang.Exception - if unable to aquire object

put

public void put(java.lang.Object component)
Return component and execute Release extensions.

Specified by:
put in interface ComponentHandler
Parameters:
component - the component

dispose

public void dispose()
Disposal of the handler.

Specified by:
dispose in interface Disposable

toString

public java.lang.String toString()
Human readable string message



Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.