org.apache.turbine.om
Class OMTool
java.lang.Object
|
+--org.apache.turbine.om.OMTool
- All Implemented Interfaces:
- ApplicationTool, Recyclable
- public class OMTool
- extends java.lang.Object
- implements ApplicationTool, Recyclable
A Pull tool to make om objects available to a template
- Version:
- $Id: OMTool.java,v 1.2 2002/07/11 14:28:45 mpoeschl Exp $
- Author:
- John D. McNally
Method Summary |
void |
dispose()
Disposes the object after use. |
java.lang.Object |
get(java.lang.String omName)
|
java.lang.Object |
get(java.lang.String omName,
java.lang.String key)
|
java.lang.String |
getName()
|
void |
init(java.lang.Object runData)
Prepares tool for a single request |
boolean |
isDisposed()
Checks whether the recyclable has been disposed. |
void |
recycle()
Recycles the object for a new client. |
void |
refresh()
Implementation of ApplicationTool interface is not needed for this
method as the tool is request scoped |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OMTool
public OMTool()
throws java.lang.Exception
init
public void init(java.lang.Object runData)
- Prepares tool for a single request
- Specified by:
init
in interface ApplicationTool
- Following copied from interface:
org.apache.turbine.services.pull.ApplicationTool
- Parameters:
data
- initialization data
refresh
public void refresh()
- Implementation of ApplicationTool interface is not needed for this
method as the tool is request scoped
- Specified by:
refresh
in interface ApplicationTool
get
public java.lang.Object get(java.lang.String omName)
throws java.lang.Exception
get
public java.lang.Object get(java.lang.String omName,
java.lang.String key)
throws java.lang.Exception
getName
public java.lang.String getName()
recycle
public void recycle()
- Recycles the object for a new client. Recycle methods with
parameters must be added to implementing object and they will be
automatically called by pool implementations when the object is
taken from the pool for a new client. The parameters must
correspond to the parameters of the constructors of the object.
For new objects, constructors can call their corresponding recycle
methods whenever applicable.
The recycle methods must call their super.
- Specified by:
recycle
in interface Recyclable
dispose
public void dispose()
- Disposes the object after use. The method is called
when the object is returned to its pool.
The dispose method must call its super.
- Specified by:
dispose
in interface Recyclable
isDisposed
public boolean isDisposed()
- Checks whether the recyclable has been disposed.
- Specified by:
isDisposed
in interface Recyclable
- Returns:
- true, if the recyclable is disposed.
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.