toolbox.web.actions.sync2async
Class Sync2AsyncAction
java.lang.Object
toolbox.web.BaseWebAction
toolbox.web.AbstractStringWebAction
toolbox.web.actions.sync2async.Sync2AsyncAction
- All Implemented Interfaces:
- WebAction
public class Sync2AsyncAction
- extends AbstractStringWebAction
Simple action implementation to take a syncrhonous HTTP request and
place the request data on an asynchronous message queue.
|
Method Summary |
void |
create(java.lang.String name,
Controller controller,
javax.servlet.ServletContext context)
Override of the create method to initialise the member
Sync2AsyncHandler. |
void |
onStringBody(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
java.lang.String body)
Handle the HTTP request and place the body content on an asynchronous
message queue. |
| Methods inherited from class toolbox.web.BaseWebAction |
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 |
Sync2AsyncAction
public Sync2AsyncAction()
- Default constructor
create
public void create(java.lang.String name,
Controller controller,
javax.servlet.ServletContext context)
throws ConfException
- Override of the create method to initialise the member
Sync2AsyncHandler.
- Specified by:
create in interface WebAction- Overrides:
create in class BaseWebAction
- Parameters:
name - Action name.controller - Controller that created this action.context - Current servlet context.
- Throws:
ConfException - if the action cannot be created.
onStringBody
public 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
- Handle the HTTP request and place the body content on an asynchronous
message queue.
- Specified by:
onStringBody in class AbstractStringWebAction
- Parameters:
request - HTTP request.response - HTTP response.context - HTTP context.body - String instance containing the body of the request.
- Throws:
javax.servlet.ServletException
java.io.IOException