org.apache.beehive.netui.pageflow
Class DefaultPageFlowEventReporter

Object
  extended by PageFlowEventReporter
      extended by DefaultPageFlowEventReporter

public class DefaultPageFlowEventReporter
extends PageFlowEventReporter

Default event reporter. Logs every event when the log level is set to "debug" or "trace".


Nested Class Summary
protected static class DefaultPageFlowEventReporter.LogMsg
           
 
Constructor Summary
protected DefaultPageFlowEventReporter(ServletContext servletContext)
           
 
Method Summary
 void actionRaised(RequestContext requestContext, FlowController flowController, ActionMapping mapping, ActionForm form)
          Event fired when an action is raised on a FlowController (a page flow or a shared flow).
 void actionSuccess(RequestContext requestContext, FlowController flowController, ActionMapping mapping, ActionForm form, ActionForward result, long timeTakenMillis)
          Event fired when an action successfully completes on a FlowController (a page flow or a shared flow).
 void beginActionRequest(RequestContext requestContext)
          Event fired at the beginning of an action request.
 void beginPageRequest(RequestContext requestContext)
          Event fired at the end of an action request.
 void endActionRequest(RequestContext requestContext, long timeTakenMillis)
          Event fired at the end of an action request.
 void endPageRequest(RequestContext requestContext, long timeTakenMillis)
          Event fired at the end of a page request.
 void exceptionHandled(RequestContext requestContext, Throwable ex, ActionMapping actionMapping, ActionForm form, FlowController flowController, ActionForward result, long timeTakenMillis)
          Event fired when an exception is handled successfully during processing of an action request.
 void exceptionRaised(RequestContext requestContext, Throwable ex, ActionMapping actionMapping, ActionForm form, FlowController flowController)
          Event fired when an exception is raised during processing of an action request.
 void flowControllerCreated(RequestContext requestContext, FlowController flowController)
          Event fired when a FlowController (a page flow or a shared flow) is created.
 void flowControllerDestroyed(FlowController flowController, Object storageLocation)
          Event fired when a FlowController (a page flow or a shared flow) is "destroyed", i.e., removed from wherever it is being stored.
 void flowControllerRegistered(String modulePath, String controllerClassName, ModuleConfig moduleConfig)
          Event fired when a page flow or shared flow is registered lazily (once per webapp deployment).
 
Methods inherited from class PageFlowEventReporter
getServletContext
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPageFlowEventReporter

protected DefaultPageFlowEventReporter(ServletContext servletContext)
Method Detail

actionRaised

public void actionRaised(RequestContext requestContext,
                         FlowController flowController,
                         ActionMapping mapping,
                         ActionForm form)
Description copied from class: PageFlowEventReporter
Event fired when an action is raised on a FlowController (a page flow or a shared flow).

Specified by:
actionRaised in class PageFlowEventReporter
Parameters:
requestContext - the current request context.
flowController - the FlowController on which the action is being raised (a PageFlowController or a SharedFlowController).
mapping - the org.apache.struts.action.ActionMapping that represents the action being raised. The name of the action, prefixed by a '/', can be found by calling getPath on this object.
form - the form bean that was passed to the action, or null if there was none.

actionSuccess

public void actionSuccess(RequestContext requestContext,
                          FlowController flowController,
                          ActionMapping mapping,
                          ActionForm form,
                          ActionForward result,
                          long timeTakenMillis)
Description copied from class: PageFlowEventReporter
Event fired when an action successfully completes on a FlowController (a page flow or a shared flow).

Specified by:
actionSuccess in class PageFlowEventReporter
Parameters:
requestContext - the current request context.
flowController - the FlowController on which the action was raised (a PageFlowController or a SharedFlowController).
mapping - the org.apache.struts.action.ActionMapping that represents the action that was raised. The name of the action, prefixed by a '/', can be found by calling getPath on this object.
form - the form bean that was passed to the action, or null if there was none.
result - the ActionForward result returned from the action.
timeTakenMillis - the length of time in milliseconds for the action to be run.

exceptionRaised

public void exceptionRaised(RequestContext requestContext,
                            Throwable ex,
                            ActionMapping actionMapping,
                            ActionForm form,
                            FlowController flowController)
Description copied from class: PageFlowEventReporter
Event fired when an exception is raised during processing of an action request.

Specified by:
exceptionRaised in class PageFlowEventReporter
Parameters:
requestContext - the current request context.
ex - the Throwable that was raised.
actionMapping - the org.apache.struts.action.ActionMapping that represents the action that was raised. The name of the action, prefixed by a '/', can be found by calling getPath on this object. This parameter will be null if the request did not get to the point where an action was actuallly raised.
form - the form bean that was passed to the action, or null if there was none.
flowController - the FlowController associated with the action request. This parameter will be null if the request did not get to the point where a FlowController could be created or looked up.
See Also:
PageFlowEventReporter.beginActionRequest(org.apache.beehive.netui.pageflow.RequestContext)

exceptionHandled

public void exceptionHandled(RequestContext requestContext,
                             Throwable ex,
                             ActionMapping actionMapping,
                             ActionForm form,
                             FlowController flowController,
                             ActionForward result,
                             long timeTakenMillis)
Description copied from class: PageFlowEventReporter
Event fired when an exception is handled successfully during processing of an action request.

Specified by:
exceptionHandled in class PageFlowEventReporter
Parameters:
requestContext - the current request context.
ex - the Throwable that was raised.
actionMapping - the org.apache.struts.action.ActionMapping that represents the action that was raised. The name of the action, prefixed by a '/', can be found by calling getPath on this object. This parameter will be null if the request did not get to the point where an action was actuallly raised.
form - the form bean that was passed to the action, or null if there was none.
flowController - the FlowController associated with the action request. This parameter will be null if the request did not get to the point where a FlowController could be created or looked up.
result - the ActionForward result returned from the exception handler.
timeTakenMillis - the length of time in milliseconds for the exception to be handled.
See Also:
PageFlowEventReporter.beginActionRequest(org.apache.beehive.netui.pageflow.RequestContext)

flowControllerCreated

public void flowControllerCreated(RequestContext requestContext,
                                  FlowController flowController)
Description copied from class: PageFlowEventReporter
Event fired when a FlowController (a page flow or a shared flow) is created.

Specified by:
flowControllerCreated in class PageFlowEventReporter
Parameters:
requestContext - the current request context.
flowController - the FlowController (a PageFlowController or a SharedFlowController) that was created.

flowControllerDestroyed

public void flowControllerDestroyed(FlowController flowController,
                                    Object storageLocation)
Description copied from class: PageFlowEventReporter
Event fired when a FlowController (a page flow or a shared flow) is "destroyed", i.e., removed from wherever it is being stored.

Specified by:
flowControllerDestroyed in class PageFlowEventReporter
Parameters:
flowController - the FlowController (a PageFlowController or a SharedFlowController) that is being destroyed.
storageLocation - The storage location. For session-scoped FlowControllers, this is a javax.servlet.http.HttpSession.

beginActionRequest

public void beginActionRequest(RequestContext requestContext)
Description copied from class: PageFlowEventReporter
Event fired at the beginning of an action request. Note that this is called on all action requests, even those that do not successfully run actions.

Specified by:
beginActionRequest in class PageFlowEventReporter
Parameters:
requestContext - the current request context.

endActionRequest

public void endActionRequest(RequestContext requestContext,
                             long timeTakenMillis)
Description copied from class: PageFlowEventReporter
Event fired at the end of an action request. Note that this is called on all action requests, even those that do not successfully run actions.

Specified by:
endActionRequest in class PageFlowEventReporter
Parameters:
requestContext - the current request context.
timeTakenMillis - the length of time in milliseconds for the action request to be processed.

beginPageRequest

public void beginPageRequest(RequestContext requestContext)
Description copied from class: PageFlowEventReporter
Event fired at the end of an action request. Note that this is called on all action requests, even those that do not successfully run actions.

Specified by:
beginPageRequest in class PageFlowEventReporter
Parameters:
requestContext - the current request context.

endPageRequest

public void endPageRequest(RequestContext requestContext,
                           long timeTakenMillis)
Description copied from class: PageFlowEventReporter
Event fired at the end of a page request.

Specified by:
endPageRequest in class PageFlowEventReporter
Parameters:
requestContext - the current request context.
timeTakenMillis - the length of time in milliseconds for the page request to be processed.

flowControllerRegistered

public void flowControllerRegistered(String modulePath,
                                     String controllerClassName,
                                     ModuleConfig moduleConfig)
Description copied from class: PageFlowEventReporter
Event fired when a page flow or shared flow is registered lazily (once per webapp deployment).

Specified by:
flowControllerRegistered in class PageFlowEventReporter
Parameters:
modulePath - the module path, which is the "parent directory" for actions on the controller.
controllerClassName - the name of the controller class.
moduleConfig - the Struts ModuleConfig that corresponds to the controller.