org.apache.avalon.fortress.impl.handler
Class LEAwareComponentHandler
java.lang.Object
org.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:
| 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_componentHandler
private final ComponentHandler m_componentHandler
-
m_extManager
private final LifecycleExtensionManager m_extManager
-
m_context
private final Context m_context
-
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
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
-
Please see keelframework.org for information about new Keel releases.