org.apache.beehive.netui.pageflow
Class PageFlowEventReporter

Object
  extended by PageFlowEventReporter
Direct Known Subclasses:
DefaultPageFlowEventReporter

public abstract class PageFlowEventReporter
extends Object

An event reporter, which will be notified of events like "page flow created", "action raised", etc.


Constructor Summary
protected PageFlowEventReporter(ServletContext servletContext)
           
 
Method Summary
abstract  void actionRaised(RequestContext requestContext, FlowController flowController, ActionMapping actionMapping, ActionForm form)
          Event fired when an action is raised on a FlowController (a page flow or a shared flow).
abstract  void actionSuccess(RequestContext requestContext, FlowController flowController, ActionMapping actionMapping, ActionForm form, ActionForward result, long timeTakenMillis)
          Event fired when an action successfully completes on a FlowController (a page flow or a shared flow).
abstract  void beginActionRequest(RequestContext requestContext)
          Event fired at the beginning of an action request.
abstract  void beginPageRequest(RequestContext requestContext)
          Event fired at the end of an action request.
abstract  void endActionRequest(RequestContext requestContext, long timeTakenMillis)
          Event fired at the end of an action request.
abstract  void endPageRequest(RequestContext requestContext, long timeTakenMillis)
          Event fired at the end of a page request.
abstract  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.
abstract  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.
abstract  void flowControllerCreated(RequestContext requestContext, FlowController flowController)
          Event fired when a FlowController (a page flow or a shared flow) is created.
abstract  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.
abstract  void flowControllerRegistered(String modulePath, String controllerClassName, ModuleConfig moduleConfig)
          Event fired when a page flow or shared flow is registered lazily (once per webapp deployment).
protected  ServletContext getServletContext()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageFlowEventReporter

protected PageFlowEventReporter(ServletContext servletContext)
Method Detail

actionRaised

public abstract void actionRaised(RequestContext requestContext,
                                  FlowController flowController,
                                  ActionMapping actionMapping,
                                  ActionForm form)
Event fired when an action is raised on a FlowController (a page flow or a shared flow).

Parameters:
requestContext - the current request context.
flowController - the FlowController on which the action is being raised (a PageFlowController or a SharedFlowController).
actionMapping - 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 abstract void actionSuccess(RequestContext requestContext,
                                   FlowController flowController,
                                   ActionMapping actionMapping,
                                   ActionForm form,
                                   ActionForward result,
                                   long timeTakenMillis)
Event fired when an action successfully completes on a FlowController (a page flow or a shared flow).

Parameters:
requestContext - the current request context.
flowController - the FlowController on which the action was raised (a PageFlowController or a SharedFlowController).
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.
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 abstract 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.

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:
beginActionRequest(org.apache.beehive.netui.pageflow.RequestContext)

exceptionHandled

public abstract 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.

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:
beginActionRequest(org.apache.beehive.netui.pageflow.RequestContext)

flowControllerCreated

public abstract void flowControllerCreated(RequestContext requestContext,
                                           FlowController flowController)
Event fired when a FlowController (a page flow or a shared flow) is created.

Parameters:
requestContext - the current request context.
flowController - the FlowController (a PageFlowController or a SharedFlowController) that was created.

flowControllerDestroyed

public abstract 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.

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 abstract void beginActionRequest(RequestContext requestContext)
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.

Parameters:
requestContext - the current request context.

endActionRequest

public abstract void endActionRequest(RequestContext requestContext,
                                      long timeTakenMillis)
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.

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

beginPageRequest

public abstract void beginPageRequest(RequestContext requestContext)
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.

Parameters:
requestContext - the current request context.

endPageRequest

public abstract void endPageRequest(RequestContext requestContext,
                                    long timeTakenMillis)
Event fired at the end of a page request.

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

flowControllerRegistered

public abstract void flowControllerRegistered(String modulePath,
                                              String controllerClassName,
                                              ModuleConfig moduleConfig)
Event fired when a page flow or shared flow is registered lazily (once per webapp deployment).

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.

getServletContext

protected ServletContext getServletContext()