我是靠谱客的博主 潇洒毛巾,最近开发中收集的这篇文章主要介绍apache httpcomponents,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

apache httpcomponents

http://hc.apache.org/httpcomponents-client-ga/examples.html

  • Response handling

    This example demonstrates how to process HTTP responses using a response handler. This is the recommended way of executing HTTP requests and processing HTTP responses. This approach enables the caller to concentrate on the process of digesting HTTP responses and to delegate the task of system resource deallocation to HttpClient. The use of an HTTP response guarantees that the underlying HTTP connection will be released back to the connection manager automatically in all cases.

reference:http://hc.apache.org/index.html

Apache HttpComponents

The Apache HttpComponents™ project is responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols.

This project functions under the Apache Software Foundation (http://www.apache.org), and is part of a larger community of developers and users.

HttpComponents Overview

The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support.

Designed for extension while providing robust support for the base HTTP protocol, the HttpComponents may be of interest to anyone building HTTP-aware client and server applications such as web browsers, web spiders, HTTP proxies, web service transport libraries, or systems that leverage 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 to build custom client and server side HTTP services with a minimal footprint. HttpCore supports two I/O models: blocking I/O model based on the classic Java I/O and non-blocking, event driven I/O model based on Java NIO.

The blocking I/O model may be more appropriate for data intensive, low latency scenarios, whereas the non-blocking model may be more appropriate for high latency scenarios where raw data throughput is less important than the ability to handle thousands of simultaneous HTTP 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. It also provides reusable components for client-side authentication, HTTP state management, and HTTP connection management. HttpComponents Client is a successor of and replacement for Commons 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 NIO and HttpClient components. It is a complementary module to Apache HttpClient intended for special cases where ability to handle a great number of concurrent connections is more important than performance in terms of a raw data throughput.

  • HttpAsyncClient Samples
posted on 2012-02-03 00:14  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/02/03/2336394.html

最后

以上就是潇洒毛巾为你收集整理的apache httpcomponents的全部内容,希望文章能够帮你解决apache httpcomponents所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部