HttpCore Tutorial

Oleg Kalnichevski


Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

1. HttpCore Scope
2. HttpCore Goals
3. What HttpCore is NOT
1. HTTP message fundamentals and classic synchronous I/O
1.1. HTTP messages
1.1.1. Structure
1.1.2. Basic operations HTTP request message HTTP response message HTTP message common properties and methods
1.1.3. HTTP entity Repeatable entities Using HTTP entities Ensuring release of system resources
1.1.4. Creating entities BasicHttpEntity ByteArrayEntity StringEntity InputStreamEntity FileEntity HttpEntityWrapper BufferedHttpEntity
1.2. Blocking HTTP connections
1.2.1. Working with blocking HTTP connections
1.2.2. Content transfer with blocking I/O
1.2.3. Supported content transfer mechanisms
1.2.4. Terminating HTTP connections
1.3. HTTP exception handling
1.3.1. Protocol exception
1.4. HTTP protocol processors
1.4.1. Standard protocol interceptors RequestContent ResponseContent RequestConnControl ResponseConnControl RequestDate ResponseDate RequestExpectContinue RequestTargetHost RequestUserAgent ResponseServer
1.4.2. Working with protocol processors
1.4.3. HTTP context
1.5. Blocking HTTP protocol handlers
1.5.1. HTTP service HTTP request handlers Request handler resolver Using HTTP service to handle requests
1.5.2. HTTP request executor
1.5.3. Connection persistence / re-use
1.6. Connection pools
1.7. TLS/SSL support
2. Asynchronous I/O based on NIO
2.1. Differences from other I/O frameworks
2.2. I/O reactor
2.2.1. I/O dispatchers
2.2.2. I/O reactor shutdown
2.2.3. I/O sessions
2.2.4. I/O session state management
2.2.5. I/O session event mask
2.2.6. I/O session buffers
2.2.7. I/O session shutdown
2.2.8. Listening I/O reactors
2.2.9. Connecting I/O reactors
2.3. I/O reactor configuration
2.3.1. Queuing of I/O interest set operations
2.4. I/O reactor exception handling
2.4.1. I/O reactor audit log
2.5. Non-blocking HTTP connections
2.5.1. Execution context of non-blocking HTTP connections
2.5.2. Working with non-blocking HTTP connections
2.5.3. HTTP I/O control
2.5.4. Non-blocking content transfer
2.5.5. Supported non-blocking content transfer mechanisms
2.5.6. Direct channel I/O
2.6. HTTP I/O event dispatchers
2.7. Non-blocking HTTP content producers
2.7.1. Creating non-blocking entities NByteArrayEntity NStringEntity NFileEntity
2.8. Non-blocking HTTP protocol handlers
2.8.1. Asynchronous HTTP service Non-blocking HTTP request handlers Asynchronous HTTP exchange Asynchronous HTTP request consumer Asynchronous HTTP response producer Non-blocking request handler resolver
2.8.2. Asynchronous HTTP request executor Asynchronous HTTP request producer Asynchronous HTTP response consumer
2.9. Non-blocking connection pools
2.10. Non-blocking TLS/SSL
2.10.1. SSL I/O session SSL setup handler
2.10.2. TLS/SSL aware I/O event dispatches
3. Advanced topics
3.1. HTTP message parsing and formatting framework
3.1.1. HTTP line parsing and formatting
3.1.2. HTTP message streams and session I/O buffers
3.1.3. HTTP message parsers and formatters
3.1.4. HTTP header parsing on demand