toolbox.web
Class AbstractStringWebAction
java.lang.Object
toolbox.web.BaseWebAction
toolbox.web.AbstractStringWebAction
- All Implemented Interfaces:
- WebAction
- Direct Known Subclasses:
- Sync2AsyncAction, XMLHttpLoggingAction
public abstract class AbstractStringWebAction
- extends BaseWebAction
- implements WebAction
A convenience WebAction implementation that may be extended to handle the
body of HTTP requests as String instances.
Sub-classes must provide an implementation of the
onStringBody(..)
method.
Method Summary |
void |
execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context)
Convert the provided request body into a String and invoke the
onStringBody(..) method. |
abstract void |
onStringBody(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
java.lang.String body)
Implementing classes must override this abstract method to implement
the required request handling functionality. |
Methods inherited from class toolbox.web.BaseWebAction |
create, dispatch, getBodyAsDocument, getBodyAsString, getDisplayTemplate, getFailureTemplate, getForeignContext, getGlobalProperty, getMessage, getName, getProperties, getProperty, getResource, getResourceBundle, getResourceString, getResourceString, getResourceString, getResourceString, getResourceString, getSuccessTemplate, getTemplate, getValidator, logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning, redirect, split |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStringWebAction
protected AbstractStringWebAction()
- Protected constructor. This class must not be instantiated.
onStringBody
public abstract void onStringBody(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
java.lang.String body)
throws javax.servlet.ServletException,
java.io.IOException
- Implementing classes must override this abstract method to implement
the required request handling functionality.
- Parameters:
request
- HTTP request.response
- HTTP response.context
- Web application context.body
- String instance containing the body of the request.
- Throws:
javax.servlet.ServletException
java.io.IOException
execute
public void execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context)
throws javax.servlet.ServletException,
java.io.IOException
- Convert the provided request body into a String and invoke the
onStringBody(..) method.
- Specified by:
execute
in interface WebAction
- Parameters:
request
- HTTP request.response
- HTTP response.context
- Web application context.
- Throws:
javax.servlet.ServletException
java.io.IOException