toolbox.services.util.logging.support
Class XMLHttpLoggingAction
java.lang.Object
toolbox.web.BaseWebAction
toolbox.web.AbstractStringWebAction
toolbox.services.util.logging.support.XMLHttpLoggingAction
- All Implemented Interfaces:
- WebAction
public class XMLHttpLoggingAction
- extends AbstractStringWebAction
WebAction implementation that exposes the logging services API through
simple XML/HTTP.
This implementation requires two custom configuration properties.
- serviceRegistry - The name of the registry where the logging service
is hosted.
- serviceName - Name of the logging service implemetation to use.
Method Summary |
void |
create(java.lang.String name,
Controller controller,
javax.servlet.ServletContext context)
This method initialises the required XML binding infrastructure
to read LogMessage instances. |
void |
onStringBody(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
java.lang.String body)
Handle the HTTP request by invoking the configured LoggingService
implementation. |
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 |
XMLHttpLoggingAction
public XMLHttpLoggingAction()
- Default constructor.
create
public void create(java.lang.String name,
Controller controller,
javax.servlet.ServletContext context)
throws ConfException
- This method initialises the required XML binding infrastructure
to read LogMessage instances.
- 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 by invoking the configured LoggingService
implementation.
- 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