Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.websody
Class GenericFunction  view GenericFunction download GenericFunction.java

java.lang.Object
  extended byorg.websody.GenericFunction
All Implemented Interfaces:
Function

public abstract class GenericFunction
extends java.lang.Object
implements Function

Generic super class for custom functions.


Field Summary
private  long lifetime
           
protected  org.apache.log4j.Category log
           
protected  java.io.Writer out
           
protected  javax.servlet.http.HttpServletRequest request
           
protected  javax.servlet.ServletContext servletContext
           
 
Constructor Summary
GenericFunction()
           
 
Method Summary
abstract  java.lang.Object execute()
           
 long getLifetime()
          Returns the lifetime in milliseconds.
 void init()
           
 long lastModified()
           
 void setLifetime(int lifetime)
          Sets the lifetime of the result in milliseconds.
 void setLifetime(java.lang.String s)
          Sets the lifetime of the result as string.
 void setOut(java.io.Writer out)
           
 void setRequest(javax.servlet.http.HttpServletRequest request)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

protected javax.servlet.http.HttpServletRequest request

servletContext

protected javax.servlet.ServletContext servletContext

out

protected java.io.Writer out

log

protected org.apache.log4j.Category log

lifetime

private long lifetime
Constructor Detail

GenericFunction

public GenericFunction()
Method Detail

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Specified by:
setServletContext in interface Function

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)
Specified by:
setRequest in interface Function

setOut

public void setOut(java.io.Writer out)
Specified by:
setOut in interface Function

init

public void init()
Specified by:
init in interface Function

execute

public abstract java.lang.Object execute()
                                  throws java.lang.Exception
Specified by:
execute in interface Function

lastModified

public long lastModified()
Specified by:
lastModified in interface Function

getLifetime

public long getLifetime()
Returns the lifetime in milliseconds.

Specified by:
getLifetime in interface Function

setLifetime

public void setLifetime(int lifetime)
Sets the lifetime of the result in milliseconds.


setLifetime

public void setLifetime(java.lang.String s)
Sets the lifetime of the result as string. You can use one of the following sufixes:
   s - seconds
   m - minutes
   h - hours
   D - days
   W - weeks
   M - months
   Y - years