apache httpcomponents
http://hc.apache.org/httpcomponents-client-ga/examples.html[*]Response handling Thisexample demonstrates how to process HTTP responses using a responsehandler. This is the recommended way of executing HTTP requests andprocessing HTTP responses. This approach enables the caller toconcentrate on the process of digesting HTTP responses and to delegatethe task of system resource deallocation to HttpClient. The use of anHTTP response guarantees that the underlying HTTP connection will bereleased back to the connection manager automatically in all cases.
reference:http://hc.apache.org/index.html
Apache HttpComponents
TheApache HttpComponents™ project is responsible for creating andmaintaining a toolset of low level Java components focused on HTTP andassociated protocols.
This project functions under the ApacheSoftware Foundation (http://www.apache.org), and is part of a largercommunity of developers and users.
HttpComponents Overview
TheHyper-Text Transfer Protocol (HTTP) is perhaps the most significantprotocol used on the Internet today. Web services, network-enabledappliances and the growth of network computing continue to expand therole of the HTTP protocol beyond user-driven web browsers, whileincreasing the number of applications that require HTTP support.
Designedfor extension while providing robust support for the base HTTPprotocol, the HttpComponents may be of interest to anyone buildingHTTP-aware client and server applications such as web browsers, webspiders, HTTP proxies, web service transport libraries, or systems thatleverage or extend the HTTP protocol for distributed communication.
HttpComponents Structure
HttpComponents Core
HttpCore is a set of low level HTTP transport components that can be used tobuild custom client and server side HTTP services with a minimalfootprint. HttpCore supports two I/O models: blocking I/O model based onthe classic Java I/O and non-blocking, event driven I/O model based onJava NIO.
The blocking I/O model may be more appropriate for dataintensive, low latency scenarios, whereas the non-blocking model may bemore appropriate for high latency scenarios where raw data throughputis less important than the ability to handle thousands of simultaneousHTTP connections in a resource efficient manner.
[*]HttpCore Tutorial ( HTML / PDF / PDF - Chinese translation kindly contributed by Nanlei; last updated Dec 10th, 2010)
[*]HttpCore Samples
HttpComponents Client
HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on HttpCore. Italso provides reusable components for client-side authentication, HTTPstate management, and HTTP connection management. HttpComponents Clientis a successor of and replacement forCommons HttpClient 3.x. Users of Commons HttpClient are strongly encouraged to upgrade.
[*]HttpClient Tutorial ( HTML / PDF /PDF - Chinese translation kindly contributed by Nanlei; last updated Dec 1st, 2010)
[*]HttpClient Samples
HttpComponents AsyncClient
Asynch HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on HttpCore NIOand HttpClient components. It is a complementary module to ApacheHttpClient intended for special cases where ability to handle a greatnumber of concurrent connections is more important than performance interms of a raw data throughput.
[*]HttpAsyncClient Samples
页:
[1]