org.webmacro
Interface ContextTool
- All Known Implementing Classes:
- MathTool, TextTool, FormTool, CookieTool, ResponseTool, FormListTool, CGITool, LocaleTool, TypeTool, SessionTool, RequestTool, TemplateTool, VariableTool, ListTool
- public interface ContextTool
This interface is used to attach utilities to a context to assist
with the generation of views.
Method Summary |
void |
destroy(java.lang.Object o)
At the end of processing this method will be called to
return the object generated by init(), in case it needs
to be recycled or otherwise cleaned up. |
java.lang.Object |
init(Context c)
A new tool object will be instantiated per-request by calling
this method. |
init
public java.lang.Object init(Context c)
throws PropertyException
- A new tool object will be instantiated per-request by calling
this method. A ContextTool is effectively a factory used to
create objects for use in templates. Some tools may simply return
themselves from this method; others may instantiate new objects
to hold the per-request state.
destroy
public void destroy(java.lang.Object o)
- At the end of processing this method will be called to
return the object generated by init(), in case it needs
to be recycled or otherwise cleaned up.