Source Code Cross Referenced for PageFlowEventReporter.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » pageflow » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.pageflow 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         *
017:         * $Header:$
018:         */
019:        package org.apache.beehive.netui.pageflow;
020:
021:        import org.apache.struts.action.ActionMapping;
022:        import org.apache.struts.action.ActionForm;
023:        import org.apache.struts.action.ActionForward;
024:        import org.apache.struts.config.ModuleConfig;
025:
026:        import javax.servlet.ServletContext;
027:
028:        /**
029:         * An event reporter, which will be notified of events like "page flow created", "action raised", etc.
030:         */
031:        public abstract class PageFlowEventReporter {
032:            private ServletContext _servletContext;
033:
034:            protected PageFlowEventReporter(ServletContext servletContext) {
035:                _servletContext = servletContext;
036:            }
037:
038:            /**
039:             * Event fired when an action is raised on a FlowController (a page flow or a shared flow).
040:             * 
041:             * @param requestContext the current request context.
042:             * @param flowController the FlowController on which the action is being raised (a
043:             *            {@link PageFlowController} or a {@link SharedFlowController}).
044:             * @param actionMapping the <code>org.apache.struts.action.ActionMapping</code> that represents the action being
045:             *            raised.  The name of the action, prefixed by a '/', can be found by calling <code>getPath</code>
046:             *            on this object.
047:             * @param form the form bean that was passed to the action, or <code>null</code> if there was none.
048:             */
049:            public abstract void actionRaised(RequestContext requestContext,
050:                    FlowController flowController, ActionMapping actionMapping,
051:                    ActionForm form);
052:
053:            /**
054:             * Event fired when an action successfully completes on a FlowController (a page flow or a shared flow).
055:             * 
056:             * @param requestContext the current request context.
057:             * @param flowController the FlowController on which the action was raised (a
058:             *            {@link PageFlowController} or a {@link SharedFlowController}).
059:             * @param actionMapping the <code>org.apache.struts.action.ActionMapping</code> that represents the action that was
060:             *            raised.  The name of the action, prefixed by a '/', can be found by calling <code>getPath</code>
061:             *            on this object.
062:             * @param form the form bean that was passed to the action, or <code>null</code> if there was none.
063:             * @param result the ActionForward result returned from the action.
064:             * @param timeTakenMillis the length of time in milliseconds for the action to be run.
065:             */
066:            public abstract void actionSuccess(RequestContext requestContext,
067:                    FlowController flowController, ActionMapping actionMapping,
068:                    ActionForm form, ActionForward result, long timeTakenMillis);
069:
070:            /**
071:             * Event fired when an exception is raised during processing of an action request.
072:             * 
073:             * @param requestContext the current request context.
074:             * @param ex the Throwable that was raised.
075:             * @param actionMapping the <code>org.apache.struts.action.ActionMapping</code> that represents the action that was
076:             *            raised.  The name of the action, prefixed by a '/', can be found by calling <code>getPath</code>
077:             *            on this object.  This parameter will be <code>null</code> if the request did not get to the point
078:             *            where an action was actuallly raised.
079:             * @param form the form bean that was passed to the action, or <code>null</code> if there was none.
080:             * @param flowController the FlowController associated with the action request.  This parameter will be
081:             *            <code>null</code> if the request did not get to the point where a FlowController could be created or
082:             *            looked up.
083:             * 
084:             * @see #beginActionRequest
085:             */
086:            public abstract void exceptionRaised(RequestContext requestContext,
087:                    Throwable ex, ActionMapping actionMapping, ActionForm form,
088:                    FlowController flowController);
089:
090:            /**
091:             * Event fired when an exception is handled successfully during processing of an action request.
092:             * 
093:             * @param requestContext the current request context.
094:             * @param ex the Throwable that was raised.
095:             * @param actionMapping the <code>org.apache.struts.action.ActionMapping</code> that represents the action that was
096:             *            raised.  The name of the action, prefixed by a '/', can be found by calling <code>getPath</code>
097:             *            on this object.  This parameter will be <code>null</code> if the request did not get to the point
098:             *            where an action was actuallly raised.
099:             * @param form the form bean that was passed to the action, or <code>null</code> if there was none.
100:             * @param flowController the FlowController associated with the action request.  This parameter will be
101:             *            <code>null</code> if the request did not get to the point where a FlowController could be created or
102:             *            looked up.
103:             * @param result the ActionForward result returned from the exception handler.
104:             * @param timeTakenMillis the length of time in milliseconds for the exception to be handled.
105:             * 
106:             * @see #beginActionRequest
107:             */
108:            public abstract void exceptionHandled(
109:                    RequestContext requestContext, Throwable ex,
110:                    ActionMapping actionMapping, ActionForm form,
111:                    FlowController flowController, ActionForward result,
112:                    long timeTakenMillis);
113:
114:            /**
115:             * 
116:             * Event fired when a FlowController (a page flow or a shared flow) is created.
117:             * 
118:             * @param requestContext the current request context.
119:             * @param flowController the FlowController (a {@link PageFlowController} or a {@link SharedFlowController})
120:             *            that was created.
121:             */
122:            public abstract void flowControllerCreated(
123:                    RequestContext requestContext, FlowController flowController);
124:
125:            /**
126:             * Event fired when a FlowController (a page flow or a shared flow) is "destroyed", i.e., removed from wherever it
127:             * is being stored.
128:             * 
129:             * @param flowController the FlowController (a {@link PageFlowController} or a {@link SharedFlowController})
130:             *            that is being destroyed.
131:             * @param storageLocation The storage location.  For session-scoped FlowControllers, this is a
132:             *            <code>javax.servlet.http.HttpSession</code>.
133:             */
134:            public abstract void flowControllerDestroyed(
135:                    FlowController flowController, Object storageLocation);
136:
137:            /**
138:             * Event fired at the beginning of an action request.  Note that this is called on all action requests, even those
139:             * that do not successfully run actions.
140:             * 
141:             * @param requestContext the current request context.
142:             */
143:            public abstract void beginActionRequest(
144:                    RequestContext requestContext);
145:
146:            /**
147:             * Event fired at the end of an action request.  Note that this is called on all action requests, even those
148:             * that do not successfully run actions.
149:             * 
150:             * @param requestContext the current request context.
151:             * @param timeTakenMillis the length of time in milliseconds for the action request to be processed.
152:             * 
153:             */
154:            public abstract void endActionRequest(
155:                    RequestContext requestContext, long timeTakenMillis);
156:
157:            /**
158:             * Event fired at the end of an action request.  Note that this is called on all action requests, even those
159:             * that do not successfully run actions.
160:             * 
161:             * @param requestContext the current request context.
162:             */
163:            public abstract void beginPageRequest(RequestContext requestContext);
164:
165:            /**
166:             * Event fired at the end of a page request.
167:             * 
168:             * @param requestContext the current request context.
169:             * @param timeTakenMillis the length of time in milliseconds for the page request to be processed.
170:             */
171:            public abstract void endPageRequest(RequestContext requestContext,
172:                    long timeTakenMillis);
173:
174:            /**
175:             * Event fired when a page flow or shared flow is registered lazily (once per webapp deployment).
176:             * 
177:             * @param modulePath the module path, which is the "parent directory" for actions on the controller.
178:             * @param controllerClassName the name of the controller class.
179:             * @param moduleConfig the Struts ModuleConfig that corresponds to the controller.
180:             */
181:            public abstract void flowControllerRegistered(String modulePath,
182:                    String controllerClassName, ModuleConfig moduleConfig);
183:
184:            protected ServletContext getServletContext() {
185:                return _servletContext;
186:            }
187:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.