You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/27 11:21:06 UTC

[13/50] [abbrv] httpcomponents-website git commit: Updated project website for HttpAsyncClient 4.1-beta1

Updated project website for HttpAsyncClient 4.1-beta1

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/project-website/trunk@1637109 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-website/commit/6f3596a8
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-website/tree/6f3596a8
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-website/diff/6f3596a8

Branch: refs/heads/master
Commit: 6f3596a8169405979bf72a5bb973859b5e9b23dd
Parents: 37ae5de
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Nov 6 14:08:35 2014 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Nov 6 14:08:35 2014 +0000

----------------------------------------------------------------------
 .../download.apt                                |  49 +++++++
 .../examples.apt                                | 106 ++++++++++++++
 .../httpcomponents-asyncclient-4.1.x/index.apt  | 113 +++++++++++++++
 .../quickstart.apt                              | 139 +++++++++++++++++++
 4 files changed, 407 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-website/blob/6f3596a8/src/site/apt/httpcomponents-asyncclient-4.1.x/download.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/httpcomponents-asyncclient-4.1.x/download.apt b/src/site/apt/httpcomponents-asyncclient-4.1.x/download.apt
new file mode 100644
index 0000000..8d1c10a
--- /dev/null
+++ b/src/site/apt/httpcomponents-asyncclient-4.1.x/download.apt
@@ -0,0 +1,49 @@
+~~ ====================================================================
+~~ 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
+~~ 
+~~   http://www.apache.org/licenses/LICENSE-2.0
+~~ 
+~~ 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.
+~~ ====================================================================
+~~ 
+~~ This software consists of voluntary contributions made by many
+~~ individuals on behalf of the Apache Software Foundation.  For more
+~~ information on the Apache Software Foundation, please see
+~~ <http://www.apache.org/>.
+
+    ----------
+    HttpComponents HttpAsyncClient Download Page
+    ----------
+    ----------
+    ----------
+
+HttpAsyncClient Downloads
+
+    The latest release available for download:
+
+    {{{http://hc.apache.org/downloads.cgi}Release packages}} - 
+    {{{http://www.apache.org/dist/httpcomponents/httpasyncclient/RELEASE_NOTES-4.1.x.txt}Release Notes}} -
+    {{{http://www.apache.org/licenses/LICENSE-2.0.html}License}}
+
+{Dependency management}
+
+    If you are using a dependency manager for your project such as 
+    {{{http://maven.apache.org}Apache Maven}} or 
+    {{{http://ant.apache.org/projects/ivy.html}Apache Ivy}}, 
+    you can create a dependency on HttpClient modules by using this information:
+
+    {{{./httpasyncclient/dependency-info.html}HttpAsyncClient}}
+
+    {{{./httpasyncclient-cache/dependency-info.html}HttpAsyncClient Cache}}
+

http://git-wip-us.apache.org/repos/asf/httpcomponents-website/blob/6f3596a8/src/site/apt/httpcomponents-asyncclient-4.1.x/examples.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/httpcomponents-asyncclient-4.1.x/examples.apt b/src/site/apt/httpcomponents-asyncclient-4.1.x/examples.apt
new file mode 100644
index 0000000..97ba5de
--- /dev/null
+++ b/src/site/apt/httpcomponents-asyncclient-4.1.x/examples.apt
@@ -0,0 +1,106 @@
+~~ ====================================================================
+~~ 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
+~~ 
+~~   http://www.apache.org/licenses/LICENSE-2.0
+~~ 
+~~ 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.
+~~ ====================================================================
+~~ 
+~~ This software consists of voluntary contributions made by many
+~~ individuals on behalf of the Apache Software Foundation.  For more
+~~ information on the Apache Software Foundation, please see
+~~ <http://www.apache.org/>.
+
+    ----------
+    HttpComponents HttpAsyncClient Examples
+    ----------
+    ----------
+    ----------
+
+HttpAsyncClient Examples
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientHttpExchange.java}
+    Asynchronous HTTP exchange}}
+
+    This example demonstrates a basic asynchronous HTTP request / response exchange. 
+    Response content is buffered in memory for simplicity.
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientHttpExchangeStreaming.java}
+    Asynchronous HTTP exchange with content streaming}}
+    
+    This example demonstrates an asynchronous HTTP request / response exchange with a full content 
+    streaming.
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientHttpExchangeFutureCallback.java}
+    Concurrent asynchronous HTTP exchanges}}
+    
+    This example demonstrates a fully asynchronous execution of multiple HTTP exchanges where the 
+    result of an individual operation is reported using a callback interface.
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientPipelined.java}
+    Pipelined HTTP exchanges}}
+
+    This example demonstrates a pipelined execution of multiple HTTP request / response exchanges.
+    Response content is buffered in memory for simplicity.
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientPipelinedStreaming.java}
+    Pipelined HTTP exchanges with content streaming}}
+
+    This example demonstrates a pipelined execution of multiple HTTP request / response exchanges
+    with a full content streaming.
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientExecuteProxy.java}
+    Asynchronous request via a proxy}}
+    
+    This example demonstrates how to send an HTTP request via a proxy.
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientConfiguration.java}
+    HttpAsyncClient configuration}}
+    
+    This example demonstrates how to customize and configure the most common aspects of HTTP request execution 
+    and connection management.
+    
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientCustomContext.java}
+    Custom execution context}}
+    
+    This example demonstrates the use of a local execution context with custom context settings.
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientAuthentication.java}
+    Client authentication}}
+
+    This example demonstrates execution of an HTTP request against a target site that requires user
+    authentication.  
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientProxyAuthentication.java}
+    Proxy authentication}}
+    
+    This example shows execution of an HTTP request over a secure connection tunneled through 
+    an authenticating proxy.  
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientCustomSSL.java}
+    Custom SSL context}}
+    
+    This example demonstrates how to create secure connections with a custom SSL context.
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/ZeroCopyHttpExchange.java}
+    Zero copy file upload / download}}
+    
+    This example demonstrates how HttpAsyncClient can be used to upload or download files without 
+    creating an intermediate content buffer in memory (zero copy file transfer).
+
+    * {{{./httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientEvictExpiredConnections.java}
+    Connection eviction}}
+    
+    This example demonstrates how to evict expired and idle connections from the connection pool.
+

http://git-wip-us.apache.org/repos/asf/httpcomponents-website/blob/6f3596a8/src/site/apt/httpcomponents-asyncclient-4.1.x/index.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/httpcomponents-asyncclient-4.1.x/index.apt b/src/site/apt/httpcomponents-asyncclient-4.1.x/index.apt
new file mode 100644
index 0000000..90cd141
--- /dev/null
+++ b/src/site/apt/httpcomponents-asyncclient-4.1.x/index.apt
@@ -0,0 +1,113 @@
+~~ ====================================================================
+~~ 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
+~~ 
+~~   http://www.apache.org/licenses/LICENSE-2.0
+~~ 
+~~ 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.
+~~ ====================================================================
+~~ 
+~~ This software consists of voluntary contributions made by many
+~~ individuals on behalf of the Apache Software Foundation.  For more
+~~ information on the Apache Software Foundation, please see
+~~ <http://www.apache.org/>.
+
+    ----------
+    HttpComponents HttpAsyncClient Overview
+    ----------
+    ----------
+    ----------
+
+HttpAsyncClient 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.
+
+    Although the java.net package provides basic functionality for accessing resources via HTTP, it 
+    doesn't provide the full flexibility or functionality needed by many applications. 
+    HttpAsyncClient seeks to fill this void by providing an efficient, up-to-date, and feature-rich 
+    package implementing the client side of the most recent HTTP standards and recommendations.
+
+    Designed for extension while providing robust support for the base HTTP protocol, 
+    HttpAsyncClient may be of interest to anyone building HTTP-aware client applications based on
+    asynchronous, event driven I/O model.
+
+{Documentation}
+
+    [[1]] {{{./quickstart.html}Quick Start}} - contains a simple, complete example of asynchronous
+    request execution.
+
+    [[1]] {{{./examples.html}HttpAsyncClient Examples}} - a set of examples demonstrating some of 
+    the more complex behavior. 
+    
+    [[1]] Project reports
+
+    * {{{./httpasyncclient/project-reports.html}HttpAsyncClient}}
+
+    * {{{./httpasyncclient-cache/project-reports.html}HttpAsyncClient Cache}}
+   
+    * {{{./httpasyncclient-osgi/project-reports.html}HttpAsyncClient OSGi}}
+   
+{Features}
+
+    * Standards based, pure Java, implementation of HTTP versions 1.0 and 1.1
+ 
+    * Full implementation of all HTTP methods (GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE) 
+    in an extensible OO framework.
+    
+    * Supports encryption with HTTPS (HTTP over SSL) protocol.
+
+    * Transparent connections through HTTP proxies.
+
+    * Tunneled HTTPS connections through HTTP proxies, via the CONNECT method.
+
+    * Connection management support concurrent request execution. Supports setting the maximum 
+      total connections as well as the maximum connections per host. Detects and closes expired 
+      connections.
+
+    * Persistent connections using KeepAlive in HTTP/1.0 and persistance in HTTP/1.1
+
+    * The ability to set connection timeouts.
+
+    * Source code is freely available under the Apache License.
+
+    * Basic, Digest, NTLMv1, NTLMv2, NTLM2 Session, SNPNEGO and Kerberos authentication schemes.
+
+    * Plug-in mechanism for custom authentication schemes.
+
+    * Automatic Cookie handling for reading Set-Cookie: headers from the server and sending them 
+      back out in a Cookie: header when appropriate.
+
+    * Plug-in mechanism for custom cookie policies.
+
+    * Support for HTTP/1.1 response caching.
+
+    * Support for pipelined request execution and processing.
+
+{Standards Compliance}
+
+    HttpAsyncClient strives to conform to the following specifications endorsed by the Internet 
+    Engineering Task Force (IETF) and the internet at large:
+
+    * {{{http://www.ietf.org/rfc/rfc1945.txt}RFC 1945}} Hypertext Transfer Protocol -- HTTP/1.0
+
+    * {{{http://www.ietf.org/rfc/rfc2616.txt}RFC 2616}} Hypertext Transfer Protocol -- HTTP/1.1
+    
+    * {{{http://www.ietf.org/rfc/rfc2617.txt}RFC 2617}} HTTP Authentication: Basic and Digest Access 
+      Authentication
+
+    * {{{http://www.ietf.org/rfc/rfc2109.txt}RFC 2109}} HTTP State Management Mechanism (Cookies)
+    
+    * {{{http://www.ietf.org/rfc/rfc2965.txt}RFC 2965}} HTTP State Management Mechanism (Cookies v2)

http://git-wip-us.apache.org/repos/asf/httpcomponents-website/blob/6f3596a8/src/site/apt/httpcomponents-asyncclient-4.1.x/quickstart.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/httpcomponents-asyncclient-4.1.x/quickstart.apt b/src/site/apt/httpcomponents-asyncclient-4.1.x/quickstart.apt
new file mode 100644
index 0000000..026be17
--- /dev/null
+++ b/src/site/apt/httpcomponents-asyncclient-4.1.x/quickstart.apt
@@ -0,0 +1,139 @@
+~~ ====================================================================
+~~ 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
+~~ 
+~~   http://www.apache.org/licenses/LICENSE-2.0
+~~ 
+~~ 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.
+~~ ====================================================================
+~~ 
+~~ This software consists of voluntary contributions made by many
+~~ individuals on behalf of the Apache Software Foundation.  For more
+~~ information on the Apache Software Foundation, please see
+~~ <http://www.apache.org/>.
+
+    ----------
+    HttpAsyncClient Quick Start
+    ----------
+    ----------
+    ----------
+
+HttpAsyncClient Quick Start
+
+    [[1]] Download 'Binary' package of the latest HttpAsyncClient 4.1 release or configure
+    dependency on {{{./httpasyncclient/dependency-info.html}HttpAsyncClient}} module using 
+    a dependency manager of your choice as described {{{./download.html}here}}. 
+
+    [[1]] HttpAsyncClient 4.1 requires Java 1.6 or newer. 
+
+    [[1]] The code fragment below illustrates the most fundamental aspects of asynchronous
+    request execution with HttpAsyncClient.
+
+-------------    
+CloseableHttpAsyncClient httpclient = HttpAsyncClients.createDefault();
+try {
+    // Start the client
+    httpclient.start();
+
+    // Execute request
+    final HttpGet request1 = new HttpGet("http://www.apache.org/");
+    Future<HttpResponse> future = httpclient.execute(request1, null);
+    // and wait until a response is received
+    HttpResponse response1 = future.get();
+    System.out.println(request1.getRequestLine() + "->" + response1.getStatusLine());
+
+    // One most likely would want to use a callback for operation result
+    final CountDownLatch latch1 = new CountDownLatch(1);
+    final HttpGet request2 = new HttpGet("http://www.apache.org/");
+    httpclient.execute(request2, new FutureCallback<HttpResponse>() {
+
+        public void completed(final HttpResponse response2) {
+            latch1.countDown();
+            System.out.println(request2.getRequestLine() + "->" + response2.getStatusLine());
+        }
+
+        public void failed(final Exception ex) {
+            latch1.countDown();
+            System.out.println(request2.getRequestLine() + "->" + ex);
+        }
+
+        public void cancelled() {
+            latch1.countDown();
+            System.out.println(request2.getRequestLine() + " cancelled");
+        }
+
+    });
+    latch1.await();
+
+    // In real world one most likely would also want to stream
+    // request and response body content
+    final CountDownLatch latch2 = new CountDownLatch(1);
+    final HttpGet request3 = new HttpGet("http://www.apache.org/");
+    HttpAsyncRequestProducer producer3 = HttpAsyncMethods.create(request3);
+    AsyncCharConsumer<HttpResponse> consumer3 = new AsyncCharConsumer<HttpResponse>() {
+
+        HttpResponse response;
+
+        @Override
+        protected void onResponseReceived(final HttpResponse response) {
+            this.response = response;
+        }
+
+        @Override
+        protected void onCharReceived(final CharBuffer buf, final IOControl ioctrl) throws IOException {
+            // Do something useful
+        }
+
+        @Override
+        protected void releaseResources() {
+        }
+
+        @Override
+        protected HttpResponse buildResult(final HttpContext context) {
+            return this.response;
+        }
+
+    };
+    httpclient.execute(producer3, consumer3, new FutureCallback<HttpResponse>() {
+
+        public void completed(final HttpResponse response3) {
+            latch2.countDown();
+            System.out.println(request2.getRequestLine() + "->" + response3.getStatusLine());
+        }
+
+        public void failed(final Exception ex) {
+            latch2.countDown();
+            System.out.println(request2.getRequestLine() + "->" + ex);
+        }
+
+        public void cancelled() {
+            latch2.countDown();
+            System.out.println(request2.getRequestLine() + " cancelled");
+        }
+
+    });
+    latch2.await();
+
+} finally {
+    httpclient.close();
+}
+-------------    
+
+    [[1]] Take a look at the {{{../httpcomponents-core-ga/tutorial/html/index.html}HttpCore 
+    tutorial}} for introduction to fundamentals of asynchronous HTTP communication with
+    HttpComponents.
+    
+    [[1]] Another good way of getting started with HttpAsyncClient is by seeing it in action. Take 
+    a look at the samples shipped with the release package or available {{{./examples.html}online}}.
+    
+