java.lang.Object
org.websody.GenericFunction
- All Implemented Interfaces:
- Function
- public abstract class GenericFunction
- extends java.lang.Object
- implements Function
Generic super class for custom functions.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
GenericFunction
public GenericFunction()
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