Source Code Cross Referenced for NHttpClientHandler.java in  » Net » httpcomponents-core-4.0-beta1 » org » apache » http » nio » 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 » Net » httpcomponents core 4.0 beta1 » org.apache.http.nio 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $HeadURL: https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0-beta1/module-nio/src/main/java/org/apache/http/nio/NHttpClientHandler.java $
003:         * $Revision: 613298 $
004:         * $Date: 2008-01-18 23:09:22 +0100 (Fri, 18 Jan 2008) $
005:         *
006:         * ====================================================================
007:         * Licensed to the Apache Software Foundation (ASF) under one
008:         * or more contributor license agreements.  See the NOTICE file
009:         * distributed with this work for additional information
010:         * regarding copyright ownership.  The ASF licenses this file
011:         * to you under the Apache License, Version 2.0 (the
012:         * "License"); you may not use this file except in compliance
013:         * with the License.  You may obtain a copy of the License at
014:         *
015:         *   http://www.apache.org/licenses/LICENSE-2.0
016:         *
017:         * Unless required by applicable law or agreed to in writing,
018:         * software distributed under the License is distributed on an
019:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
020:         * KIND, either express or implied.  See the License for the
021:         * specific language governing permissions and limitations
022:         * under the License.
023:         * ====================================================================
024:         *
025:         * This software consists of voluntary contributions made by many
026:         * individuals on behalf of the Apache Software Foundation.  For more
027:         * information on the Apache Software Foundation, please see
028:         * <http://www.apache.org/>.
029:         *
030:         */
031:
032:        package org.apache.http.nio;
033:
034:        import java.io.IOException;
035:
036:        import org.apache.http.HttpException;
037:
038:        /**
039:         * Abstract client-side HTTP event handler.   
040:         * 
041:         * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
042:         */
043:        public interface NHttpClientHandler {
044:
045:            /**
046:             * Triggered when a new outgoing connection is created.
047:             * 
048:             * @param conn closed HTTP connection.
049:             * @param attachment an arbitrary object that was attached to the
050:             *  session request
051:             */
052:            void connected(NHttpClientConnection conn, Object attachment);
053:
054:            /**
055:             * Triggered when the connection is ready to send an HTTP request.
056:             * 
057:             * @see NHttpClientConnection
058:             * 
059:             * @param conn HTTP connection that is ready to send an HTTP request
060:             */
061:            void requestReady(NHttpClientConnection conn);
062:
063:            /**
064:             * Triggered when an HTTP response is received. The connection
065:             * passed as a parameter to this method is guaranteed to return
066:             * a valid HTTP response object.
067:             * <p/>
068:             * If the response received encloses a response entity this method will 
069:             * be followed a series of 
070:             * {@link #inputReady(NHttpClientConnection, ContentDecoder)} calls
071:             * to transfer the response content.
072:             * 
073:             * @see NHttpClientConnection
074:             * 
075:             * @param conn HTTP connection that contains an HTTP response
076:             */
077:            void responseReceived(NHttpClientConnection conn);
078:
079:            /**
080:             * Triggered when the underlying channel is ready for reading a
081:             * new portion of the response entity through the corresponding 
082:             * content decoder. 
083:             * <p/>
084:             * If the content consumer is unable to process the incoming content,
085:             * input event notifications can be temorarily suspended using 
086:             * {@link NHttpConnection#suspendInput()}.
087:             * 
088:             * @see NHttpConnection
089:             * @see ContentDecoder
090:             *  
091:             * @param conn HTTP connection that can produce a new portion of the
092:             * incoming response content.
093:             * @param decoder The content decoder to use to read content.
094:             */
095:            void inputReady(NHttpClientConnection conn, ContentDecoder decoder);
096:
097:            /**
098:             * Triggered when the underlying channel is ready for writing a
099:             * next portion of the request entity through the corresponding 
100:             * content encoder. 
101:             * <p/>
102:             * If the content producer is unable to generate the outgoing content,
103:             * output event notifications can be temorarily suspended using 
104:             * {@link NHttpConnection#suspendOutput()}.
105:             * 
106:             * @see NHttpConnection
107:             * @see ContentEncoder
108:             *  
109:             * @param conn HTTP connection that can accommodate a new portion 
110:             * of the outgoing request content.
111:             * @param encoder The content encoder to use to write content.
112:             */
113:            void outputReady(NHttpClientConnection conn, ContentEncoder encoder);
114:
115:            /**
116:             * Triggered when an I/O error occurrs while reading from or writing
117:             * to the underlying channel.
118:             * 
119:             * @param conn HTTP connection that caused an I/O error
120:             * @param ex I/O exception
121:             */
122:            void exception(NHttpClientConnection conn, IOException ex);
123:
124:            /**
125:             * Triggered when an HTTP protocol violation occurs while receiving 
126:             * an HTTP response.
127:             * 
128:             * @param conn HTTP connection that caused an HTTP protocol violation
129:             * @param ex HTTP protocol violation exception
130:             */
131:            void exception(NHttpClientConnection conn, HttpException ex);
132:
133:            /**
134:             * Triggered when no input is detected on this connection over the
135:             * maximum period of inactivity.
136:             * 
137:             * @param conn HTTP connection that caused timeout condition.
138:             */
139:            void timeout(NHttpClientConnection conn);
140:
141:            /**
142:             * Triggered when the connection is closed.
143:             * 
144:             * @param conn closed HTTP connection.
145:             */
146:            void closed(NHttpClientConnection conn);
147:
148:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.