KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > pageflow > PageFlowEventReporter


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18 package org.apache.beehive.netui.pageflow;
19
20 import org.apache.struts.action.ActionMapping;
21 import org.apache.struts.action.ActionForm;
22 import org.apache.struts.action.ActionForward;
23
24 import javax.servlet.ServletContext JavaDoc;
25 import javax.servlet.ServletResponse JavaDoc;
26 import javax.servlet.ServletRequest JavaDoc;
27
28
29 /**
30  * An event reporter, which will be notified of events like "page flow created", "action raised", etc.
31  */

32 public abstract class PageFlowEventReporter
33 {
34     private ServletContext JavaDoc _servletContext;
35     
36     protected PageFlowEventReporter( ServletContext JavaDoc servletContext )
37     {
38         _servletContext = servletContext;
39     }
40     
41     public abstract void actionRaised( FlowController flowController, ActionMapping mapping, ActionForm form,
42                                        ServletRequest JavaDoc request, ServletResponse JavaDoc response );
43     
44     public abstract void actionSuccess( FlowController flowController, ActionMapping mapping, ActionForm form,
45                                         ServletRequest JavaDoc request, ServletResponse JavaDoc response, ActionForward result,
46                                         long timeTakenMillis );
47     
48     public abstract void exceptionRaised( Throwable JavaDoc ex, ActionMapping actionMapping, ActionForm form,
49                                           FlowController flowController, ServletRequest JavaDoc request,
50                                           ServletResponse JavaDoc response );
51     
52     public abstract void exceptionHandled( Throwable JavaDoc ex, ActionMapping actionMapping, ActionForm form,
53                                            FlowController flowController, ServletRequest JavaDoc request,
54                                            ServletResponse JavaDoc response, ActionForward result,
55                                            long timeTakenMillis );
56     
57     public abstract void flowControllerCreated( FlowController flowController, ServletRequest JavaDoc request,
58                                                 ServletResponse JavaDoc response );
59     
60     public abstract void flowControllerDestroyed( FlowController flowController );
61     
62     public abstract void beginActionRequest( ServletRequest JavaDoc request, ServletResponse JavaDoc response );
63     
64     public abstract void endActionRequest( ServletRequest JavaDoc request, ServletResponse JavaDoc response, long timeTakenMillis );
65     
66     public abstract void beginPageRequest( ServletRequest JavaDoc request, ServletResponse JavaDoc response );
67     
68     public abstract void endPageRequest( ServletRequest JavaDoc request, ServletResponse JavaDoc response, long timeTakenMillis );
69     
70     protected ServletContext JavaDoc getServletContext()
71     {
72         return _servletContext;
73     }
74 }
75
Popular Tags