Source Code Cross Referenced for Valve.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » catalina » 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 » Sevlet Container » apache tomcat 6.0.14 » org.apache.catalina 
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:
018:        package org.apache.catalina;
019:
020:        import java.io.IOException;
021:        import javax.servlet.ServletException;
022:
023:        import org.apache.catalina.connector.Request;
024:        import org.apache.catalina.connector.Response;
025:
026:        /**
027:         * <p>A <b>Valve</b> is a request processing component associated with a
028:         * particular Container.  A series of Valves are generally associated with
029:         * each other into a Pipeline.  The detailed contract for a Valve is included
030:         * in the description of the <code>invoke()</code> method below.</p>
031:         *
032:         * <b>HISTORICAL NOTE</b>:  The "Valve" name was assigned to this concept
033:         * because a valve is what you use in a real world pipeline to control and/or
034:         * modify flows through it.
035:         *
036:         * @author Craig R. McClanahan
037:         * @author Gunnar Rjnning
038:         * @author Peter Donald
039:         * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
040:         */
041:
042:        public interface Valve {
043:
044:            //-------------------------------------------------------------- Properties
045:
046:            /**
047:             * Return descriptive information about this Valve implementation.
048:             */
049:            public String getInfo();
050:
051:            /**
052:             * Return the next Valve in the pipeline containing this Valve, if any.
053:             */
054:            public Valve getNext();
055:
056:            /**
057:             * Set the next Valve in the pipeline containing this Valve.
058:             *
059:             * @param valve The new next valve, or <code>null</code> if none
060:             */
061:            public void setNext(Valve valve);
062:
063:            //---------------------------------------------------------- Public Methods
064:
065:            /**
066:             * Execute a periodic task, such as reloading, etc. This method will be
067:             * invoked inside the classloading context of this container. Unexpected
068:             * throwables will be caught and logged.
069:             */
070:            public void backgroundProcess();
071:
072:            /**
073:             * <p>Perform request processing as required by this Valve.</p>
074:             *
075:             * <p>An individual Valve <b>MAY</b> perform the following actions, in
076:             * the specified order:</p>
077:             * <ul>
078:             * <li>Examine and/or modify the properties of the specified Request and
079:             *     Response.
080:             * <li>Examine the properties of the specified Request, completely generate
081:             *     the corresponding Response, and return control to the caller.
082:             * <li>Examine the properties of the specified Request and Response, wrap
083:             *     either or both of these objects to supplement their functionality,
084:             *     and pass them on.
085:             * <li>If the corresponding Response was not generated (and control was not
086:             *     returned, call the next Valve in the pipeline (if there is one) by
087:             *     executing <code>context.invokeNext()</code>.
088:             * <li>Examine, but not modify, the properties of the resulting Response
089:             *     (which was created by a subsequently invoked Valve or Container).
090:             * </ul>
091:             *
092:             * <p>A Valve <b>MUST NOT</b> do any of the following things:</p>
093:             * <ul>
094:             * <li>Change request properties that have already been used to direct
095:             *     the flow of processing control for this request (for instance,
096:             *     trying to change the virtual host to which a Request should be
097:             *     sent from a pipeline attached to a Host or Context in the
098:             *     standard implementation).
099:             * <li>Create a completed Response <strong>AND</strong> pass this
100:             *     Request and Response on to the next Valve in the pipeline.
101:             * <li>Consume bytes from the input stream associated with the Request,
102:             *     unless it is completely generating the response, or wrapping the
103:             *     request before passing it on.
104:             * <li>Modify the HTTP headers included with the Response after the
105:             *     <code>invokeNext()</code> method has returned.
106:             * <li>Perform any actions on the output stream associated with the
107:             *     specified Response after the <code>invokeNext()</code> method has
108:             *     returned.
109:             * </ul>
110:             *
111:             * @param request The servlet request to be processed
112:             * @param response The servlet response to be created
113:             *
114:             * @exception IOException if an input/output error occurs, or is thrown
115:             *  by a subsequently invoked Valve, Filter, or Servlet
116:             * @exception ServletException if a servlet error occurs, or is thrown
117:             *  by a subsequently invoked Valve, Filter, or Servlet
118:             */
119:            public void invoke(Request request, Response response)
120:                    throws IOException, ServletException;
121:
122:            /**
123:             * Process a Comet event.
124:             *
125:             * @param request The servlet request to be processed
126:             * @param response The servlet response to be created
127:             *
128:             * @exception IOException if an input/output error occurs, or is thrown
129:             *  by a subsequently invoked Valve, Filter, or Servlet
130:             * @exception ServletException if a servlet error occurs, or is thrown
131:             *  by a subsequently invoked Valve, Filter, or Servlet
132:             */
133:            public void event(Request request, Response response,
134:                    CometEvent event) throws IOException, ServletException;
135:
136:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.