hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1242391 - in /httpcomponents/httpasyncclient/trunk/httpasyncclient/src: main/java/org/apache/http/impl/nio/client/ main/java/org/apache/http/impl/nio/conn/ main/java/org/apache/http/nio/conn/ test/java/org/apache/http/ test/java/org/apache...
Date Thu, 09 Feb 2012 16:44:32 GMT
Author: olegk
Date: Thu Feb  9 16:44:31 2012
New Revision: 1242391

URL: http://svn.apache.org/viewvc?rev=1242391&view=rev
Log:
HTTPASYNC-5: PoolingClientAsyncConnectionManager to provide a factory method to create custom ClientAsyncConnection factory

Added:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java   (contents, props changed)
      - copied, changed from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultAsyncClientConnection.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnectionFactory.java   (with props)
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java   (contents, props changed)
      - copied, changed from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedAsyncClientConnectionImpl.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.java   (contents, props changed)
      - copied, changed from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingAsyncClientConnectionManager.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnection.java
      - copied, changed from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionFactory.java   (contents, props changed)
      - copied, changed from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedClientAsyncConnection.java   (contents, props changed)
      - copied, changed from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedAsyncClientConnection.java
Removed:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultAsyncClientConnection.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedAsyncClientConnectionImpl.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingAsyncClientConnectionManager.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedAsyncClientConnection.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java
Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/AbstractHttpAsyncClient.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/HttpPoolEntry.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionManager.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/HttpAsyncTestBase.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestStatefulConnManagement.java

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/AbstractHttpAsyncClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/AbstractHttpAsyncClient.java?rev=1242391&r1=1242390&r2=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/AbstractHttpAsyncClient.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/AbstractHttpAsyncClient.java Thu Feb  9 16:44:31 2012
@@ -77,7 +77,7 @@ import org.apache.http.impl.cookie.RFC21
 import org.apache.http.impl.cookie.RFC2965SpecFactory;
 import org.apache.http.impl.nio.DefaultHttpClientIODispatch;
 import org.apache.http.impl.nio.conn.DefaultHttpAsyncRoutePlanner;
-import org.apache.http.impl.nio.conn.PoolingAsyncClientConnectionManager;
+import org.apache.http.impl.nio.conn.PoolingClientAsyncConnectionManager;
 import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
 import org.apache.http.impl.nio.reactor.IOReactorConfig;
 import org.apache.http.nio.client.HttpAsyncClient;
@@ -131,7 +131,7 @@ public abstract class AbstractHttpAsyncC
         super();
         DefaultConnectingIOReactor defaultioreactor = new DefaultConnectingIOReactor(config);
         defaultioreactor.setExceptionHandler(new InternalIOReactorExceptionHandler(this.log));
-        this.connmgr = new PoolingAsyncClientConnectionManager(defaultioreactor);
+        this.connmgr = new PoolingClientAsyncConnectionManager(defaultioreactor);
         this.queue = new ConcurrentLinkedQueue<HttpAsyncRequestExecutionHandler<?>>();
     }
 

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java?rev=1242391&r1=1242390&r2=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java Thu Feb  9 16:44:31 2012
@@ -78,7 +78,7 @@ import org.apache.http.nio.ContentDecode
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.IOControl;
 import org.apache.http.nio.conn.ClientAsyncConnectionManager;
-import org.apache.http.nio.conn.ManagedAsyncClientConnection;
+import org.apache.http.nio.conn.ManagedClientAsyncConnection;
 import org.apache.http.nio.conn.scheme.AsyncScheme;
 import org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler;
 import org.apache.http.nio.protocol.HttpAsyncRequestExecutor;
@@ -121,8 +121,8 @@ class DefaultAsyncRequestDirector<T> imp
     private RequestWrapper currentRequest;
     private HttpResponse currentResponse;
     private boolean routeEstablished;
-    private Future<ManagedAsyncClientConnection> connFuture;
-    private ManagedAsyncClientConnection managedConn;
+    private Future<ManagedClientAsyncConnection> connFuture;
+    private ManagedClientAsyncConnection managedConn;
     private int redirectCount;
     private ByteBuffer tmpbuf;
     private boolean requestContentProduced;
@@ -481,7 +481,7 @@ class DefaultAsyncRequestDirector<T> imp
         return this.responseConsumer.getException();
     }
 
-    private synchronized void connectionRequestCompleted(final ManagedAsyncClientConnection conn) {
+    private synchronized void connectionRequestCompleted(final ManagedClientAsyncConnection conn) {
         if (this.log.isDebugEnabled()) {
             this.log.debug("Connection request suceeded: " + conn);
         }
@@ -520,9 +520,9 @@ class DefaultAsyncRequestDirector<T> imp
         }
     }
 
-    class InternalFutureCallback implements FutureCallback<ManagedAsyncClientConnection> {
+    class InternalFutureCallback implements FutureCallback<ManagedClientAsyncConnection> {
 
-        public void completed(final ManagedAsyncClientConnection session) {
+        public void completed(final ManagedClientAsyncConnection session) {
             connectionRequestCompleted(session);
         }
 

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java?rev=1242391&r1=1242390&r2=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java Thu Feb  9 16:44:31 2012
@@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFac
 import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.HttpResponse;
-import org.apache.http.impl.nio.conn.DefaultAsyncClientConnection;
+import org.apache.http.impl.nio.conn.DefaultClientAsyncConnection;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.NHttpClientConnection;
@@ -122,8 +122,8 @@ class LoggingAsyncRequestExecutor extend
         if (this.headerlog.isDebugEnabled()) {
             HttpResponse response = conn.getHttpResponse();
             String id;
-            if (conn instanceof DefaultAsyncClientConnection) {
-                id = ((DefaultAsyncClientConnection) conn).getId();
+            if (conn instanceof DefaultClientAsyncConnection) {
+                id = ((DefaultClientAsyncConnection) conn).getId();
             } else {
                 id = conn.toString();
             }

Copied: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java (from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultAsyncClientConnection.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java?p2=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java&p1=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultAsyncClientConnection.java&r1=1242390&r2=1242391&rev=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultAsyncClientConnection.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java Thu Feb  9 16:44:31 2012
@@ -35,13 +35,13 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponseFactory;
 import org.apache.http.impl.nio.DefaultNHttpClientConnection;
-import org.apache.http.nio.conn.OperatedAsyncClientConnection;
+import org.apache.http.nio.conn.ClientAsyncConnection;
 import org.apache.http.nio.reactor.IOSession;
 import org.apache.http.nio.util.ByteBufferAllocator;
 import org.apache.http.params.HttpParams;
 
-public class DefaultAsyncClientConnection
-                    extends DefaultNHttpClientConnection implements OperatedAsyncClientConnection {
+public class DefaultClientAsyncConnection
+                    extends DefaultNHttpClientConnection implements ClientAsyncConnection {
 
     private final Log headerlog = LogFactory.getLog("org.apache.http.headers");
     private final Log wirelog   = LogFactory.getLog("org.apache.http.wire");
@@ -50,7 +50,7 @@ public class DefaultAsyncClientConnectio
     private String id;
     private IOSession original;
 
-    public DefaultAsyncClientConnection(
+    public DefaultClientAsyncConnection(
             final String id,
             final IOSession iosession,
             final HttpResponseFactory responseFactory,

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnectionFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnectionFactory.java?rev=1242391&view=auto
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnectionFactory.java (added)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnectionFactory.java Thu Feb  9 16:44:31 2012
@@ -0,0 +1,65 @@
+/*
+ * ====================================================================
+ * 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/>.
+ *
+ */
+package org.apache.http.impl.nio.conn;
+
+import org.apache.http.HttpResponseFactory;
+import org.apache.http.impl.DefaultHttpResponseFactory;
+import org.apache.http.nio.conn.ClientAsyncConnection;
+import org.apache.http.nio.conn.ClientAsyncConnectionFactory;
+import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.nio.util.ByteBufferAllocator;
+import org.apache.http.nio.util.HeapByteBufferAllocator;
+import org.apache.http.params.HttpParams;
+
+public class DefaultClientAsyncConnectionFactory implements ClientAsyncConnectionFactory {
+
+    private final HttpResponseFactory responseFactory;
+    private final ByteBufferAllocator allocator;
+    
+    public DefaultClientAsyncConnectionFactory() {
+        super();
+        this.responseFactory = createHttpResponseFactory();
+        this.allocator = createByteBufferAllocator();
+    }
+    
+    public ClientAsyncConnection create(
+            final String id, 
+            final IOSession iosession,
+            final HttpParams params) {
+        return new DefaultClientAsyncConnection(
+                id, iosession, this.responseFactory, this.allocator, params);
+    }
+
+    protected ByteBufferAllocator createByteBufferAllocator() {
+        return new HeapByteBufferAllocator();
+    }
+
+    protected HttpResponseFactory createHttpResponseFactory() {
+        return new DefaultHttpResponseFactory();
+    }
+    
+}

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnectionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnectionFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnectionFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/HttpPoolEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/HttpPoolEntry.java?rev=1242391&r1=1242390&r2=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/HttpPoolEntry.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/HttpPoolEntry.java Thu Feb  9 16:44:31 2012
@@ -33,10 +33,10 @@ import java.util.concurrent.TimeUnit;
 import org.apache.commons.logging.Log;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.conn.routing.RouteTracker;
-import org.apache.http.nio.conn.OperatedAsyncClientConnection;
+import org.apache.http.nio.conn.ClientAsyncConnection;
+import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.IOSession;
 import org.apache.http.pool.PoolEntry;
-import org.apache.http.protocol.ExecutionContext;
 
 class HttpPoolEntry extends PoolEntry<HttpRoute, IOSession> {
 
@@ -59,10 +59,9 @@ class HttpPoolEntry extends PoolEntry<Ht
         return expired;
     }
 
-    public OperatedAsyncClientConnection getOperatedClientConnection() {
+    public ClientAsyncConnection getOperatedClientConnection() {
         IOSession session = getConnection();
-        return (OperatedAsyncClientConnection) session.getAttribute(
-                ExecutionContext.HTTP_CONNECTION);
+        return (ClientAsyncConnection) session.getAttribute(IOEventDispatch.CONNECTION_KEY);
     }
 
     @Override

Copied: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java (from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedAsyncClientConnectionImpl.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java?p2=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java&p1=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedAsyncClientConnectionImpl.java&r1=1242390&r2=1242391&rev=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedAsyncClientConnectionImpl.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java Thu Feb  9 16:44:31 2012
@@ -37,36 +37,36 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
-import org.apache.http.HttpResponseFactory;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.conn.routing.RouteTracker;
-import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.impl.conn.ConnectionShutdownException;
+import org.apache.http.nio.conn.ClientAsyncConnectionFactory;
 import org.apache.http.nio.conn.ClientAsyncConnectionManager;
-import org.apache.http.nio.conn.ManagedAsyncClientConnection;
-import org.apache.http.nio.conn.OperatedAsyncClientConnection;
+import org.apache.http.nio.conn.ManagedClientAsyncConnection;
+import org.apache.http.nio.conn.ClientAsyncConnection;
 import org.apache.http.nio.conn.scheme.LayeringStrategy;
 import org.apache.http.nio.conn.scheme.AsyncScheme;
+import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.IOSession;
 import org.apache.http.nio.reactor.ssl.SSLIOSession;
-import org.apache.http.nio.util.ByteBufferAllocator;
-import org.apache.http.nio.util.HeapByteBufferAllocator;
 import org.apache.http.params.HttpParams;
-import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
 
-class ManagedAsyncClientConnectionImpl implements ManagedAsyncClientConnection {
+class ManagedClientAsyncConnectionImpl implements ManagedClientAsyncConnection {
 
     private final ClientAsyncConnectionManager manager;
+    private final ClientAsyncConnectionFactory connFactory;
     private volatile HttpPoolEntry poolEntry;
     private volatile boolean reusable;
     private volatile long duration;
 
-    ManagedAsyncClientConnectionImpl(
+    ManagedClientAsyncConnectionImpl(
             final ClientAsyncConnectionManager manager,
+            final ClientAsyncConnectionFactory connFactory,
             final HttpPoolEntry poolEntry) {
         super();
         this.manager = manager;
+        this.connFactory = connFactory;
         this.poolEntry = poolEntry;
         this.reusable = true;
         this.duration = Long.MAX_VALUE;
@@ -86,24 +86,22 @@ class ManagedAsyncClientConnectionImpl i
         return this.manager;
     }
 
-    private OperatedAsyncClientConnection getConnection() {
+    private ClientAsyncConnection getConnection() {
         HttpPoolEntry local = this.poolEntry;
         if (local == null) {
             return null;
         }
         IOSession session = local.getConnection();
-        return (OperatedAsyncClientConnection) session.getAttribute(
-                ExecutionContext.HTTP_CONNECTION);
+        return (ClientAsyncConnection) session.getAttribute(IOEventDispatch.CONNECTION_KEY);
     }
 
-    private OperatedAsyncClientConnection ensureConnection() {
+    private ClientAsyncConnection ensureConnection() {
         HttpPoolEntry local = this.poolEntry;
         if (local == null) {
             throw new ConnectionShutdownException();
         }
         IOSession session = local.getConnection();
-        return (OperatedAsyncClientConnection) session.getAttribute(
-                ExecutionContext.HTTP_CONNECTION);
+        return (ClientAsyncConnection) session.getAttribute(IOEventDispatch.CONNECTION_KEY);
     }
 
     private HttpPoolEntry ensurePoolEntry() {
@@ -115,21 +113,21 @@ class ManagedAsyncClientConnectionImpl i
     }
 
     public void close() throws IOException {
-        OperatedAsyncClientConnection conn = getConnection();
+        ClientAsyncConnection conn = getConnection();
         if (conn != null) {
             conn.close();
         }
     }
 
     public void shutdown() throws IOException {
-        OperatedAsyncClientConnection conn = getConnection();
+        ClientAsyncConnection conn = getConnection();
         if (conn != null) {
             conn.shutdown();
         }
     }
 
     public boolean isOpen() {
-        OperatedAsyncClientConnection conn = getConnection();
+        ClientAsyncConnection conn = getConnection();
         if (conn != null) {
             return conn.isOpen();
         } else {
@@ -142,102 +140,102 @@ class ManagedAsyncClientConnectionImpl i
     }
 
     public void setSocketTimeout(int timeout) {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         conn.setSocketTimeout(timeout);
     }
 
     public int getSocketTimeout() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getSocketTimeout();
     }
 
     public HttpConnectionMetrics getMetrics() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getMetrics();
     }
 
     public InetAddress getLocalAddress() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getLocalAddress();
     }
 
     public int getLocalPort() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getLocalPort();
     }
 
     public InetAddress getRemoteAddress() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getRemoteAddress();
     }
 
     public int getRemotePort() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getRemotePort();
     }
 
     public int getStatus() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getStatus();
     }
 
     public HttpRequest getHttpRequest() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getHttpRequest();
     }
 
     public HttpResponse getHttpResponse() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getHttpResponse();
     }
 
     public HttpContext getContext() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getContext();
     }
 
     public void requestInput() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         conn.requestInput();
     }
 
     public void suspendInput() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         conn.suspendInput();
     }
 
     public void requestOutput() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         conn.requestOutput();
     }
 
     public void suspendOutput() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         conn.suspendOutput();
     }
 
     public void submitRequest(final HttpRequest request) throws IOException, HttpException {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         conn.submitRequest(request);
     }
 
     public boolean isRequestSubmitted() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.isRequestSubmitted();
     }
 
     public void resetOutput() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         conn.resetOutput();
     }
 
     public void resetInput() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         conn.resetInput();
     }
 
     public boolean isSecure() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         return conn.getIOSession() instanceof SSLIOSession;
     }
 
@@ -247,7 +245,7 @@ class ManagedAsyncClientConnectionImpl i
     }
 
     public SSLSession getSSLSession() {
-        OperatedAsyncClientConnection conn = ensureConnection();
+        ClientAsyncConnection conn = ensureConnection();
         IOSession iosession = conn.getIOSession();
         if (iosession instanceof SSLIOSession) {
             return ((SSLIOSession) iosession).getSSLSession();
@@ -286,14 +284,6 @@ class ManagedAsyncClientConnectionImpl i
         }
     }
 
-    protected ByteBufferAllocator createByteBufferAllocator() {
-        return new HeapByteBufferAllocator();
-    }
-
-    protected HttpResponseFactory createHttpResponseFactory() {
-        return new DefaultHttpResponseFactory();
-    }
-
     public synchronized void open(
             final HttpRoute route,
             final HttpContext context, 
@@ -316,13 +306,11 @@ class ManagedAsyncClientConnectionImpl i
             }
         }
 
-        OperatedAsyncClientConnection conn = new DefaultAsyncClientConnection(
-                "http-outgoing-" + entry.getId(),
-                iosession,
-                createHttpResponseFactory(),
-                createByteBufferAllocator(),
+        ClientAsyncConnection conn = this.connFactory.create(
+                "http-outgoing-" + entry.getId(), 
+                iosession, 
                 params);
-        iosession.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        iosession.setAttribute(IOEventDispatch.CONNECTION_KEY, conn);
 
         if (proxy == null) {
             tracker.connectTarget(conn.getIOSession() instanceof SSLIOSession);
@@ -375,8 +363,8 @@ class ManagedAsyncClientConnectionImpl i
                     " scheme does not provider support for protocol layering");
         }
         IOSession iosession = entry.getConnection();
-        OperatedAsyncClientConnection conn = (OperatedAsyncClientConnection) iosession.getAttribute(
-                ExecutionContext.HTTP_CONNECTION);
+        ClientAsyncConnection conn = (ClientAsyncConnection) iosession.getAttribute(
+                IOEventDispatch.CONNECTION_KEY);
         conn.upgrade((SSLIOSession) layeringStrategy.layer(iosession));
         tracker.layerProtocol(layeringStrategy.isSecure());
     }
@@ -395,8 +383,8 @@ class ManagedAsyncClientConnectionImpl i
         }
         this.reusable = false;
         IOSession iosession = this.poolEntry.getConnection();
-        OperatedAsyncClientConnection conn = (OperatedAsyncClientConnection) iosession.getAttribute(
-                ExecutionContext.HTTP_CONNECTION);
+        ClientAsyncConnection conn = (ClientAsyncConnection) iosession.getAttribute(
+                IOEventDispatch.CONNECTION_KEY);
         try {
             conn.shutdown();
         } catch (IOException ignore) {

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.java (from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingAsyncClientConnectionManager.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.java?p2=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.java&p1=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingAsyncClientConnectionManager.java&r1=1242390&r2=1242391&rev=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingAsyncClientConnectionManager.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.java Thu Feb  9 16:44:31 2012
@@ -35,7 +35,8 @@ import org.apache.commons.logging.LogFac
 import org.apache.http.concurrent.BasicFuture;
 import org.apache.http.concurrent.FutureCallback;
 import org.apache.http.conn.routing.HttpRoute;
-import org.apache.http.nio.conn.ManagedAsyncClientConnection;
+import org.apache.http.nio.conn.ClientAsyncConnectionFactory;
+import org.apache.http.nio.conn.ManagedClientAsyncConnection;
 import org.apache.http.nio.conn.ClientAsyncConnectionManager;
 import org.apache.http.nio.conn.scheme.AsyncSchemeRegistry;
 import org.apache.http.nio.reactor.ConnectingIOReactor;
@@ -45,7 +46,7 @@ import org.apache.http.nio.reactor.IORea
 import org.apache.http.pool.ConnPoolControl;
 import org.apache.http.pool.PoolStats;
 
-public class PoolingAsyncClientConnectionManager
+public class PoolingClientAsyncConnectionManager
                               implements ClientAsyncConnectionManager, ConnPoolControl<HttpRoute> {
 
     private final Log log = LogFactory.getLog(getClass());
@@ -53,8 +54,9 @@ public class PoolingAsyncClientConnectio
     private final ConnectingIOReactor ioreactor;
     private final HttpNIOConnPool pool;
     private final AsyncSchemeRegistry schemeRegistry;
+    private final ClientAsyncConnectionFactory connFactory;
 
-    public PoolingAsyncClientConnectionManager(
+    public PoolingClientAsyncConnectionManager(
             final ConnectingIOReactor ioreactor,
             final AsyncSchemeRegistry schemeRegistry,
             final long timeToLive, final TimeUnit tunit) {
@@ -71,15 +73,16 @@ public class PoolingAsyncClientConnectio
         this.ioreactor = ioreactor;
         this.pool = new HttpNIOConnPool(this.log, ioreactor, schemeRegistry, timeToLive, tunit);
         this.schemeRegistry = schemeRegistry;
+        this.connFactory = createClientAsyncConnectionFactory();
     }
 
-    public PoolingAsyncClientConnectionManager(
+    public PoolingClientAsyncConnectionManager(
             final ConnectingIOReactor ioreactor,
             final AsyncSchemeRegistry schemeRegistry) throws IOReactorException {
         this(ioreactor, schemeRegistry, -1, TimeUnit.MILLISECONDS);
     }
 
-    public PoolingAsyncClientConnectionManager(
+    public PoolingClientAsyncConnectionManager(
             final ConnectingIOReactor ioreactor) throws IOReactorException {
         this(ioreactor, AsyncSchemeRegistryFactory.createDefault());
     }
@@ -93,6 +96,10 @@ public class PoolingAsyncClientConnectio
         }
     }
 
+    protected ClientAsyncConnectionFactory createClientAsyncConnectionFactory() {
+        return new DefaultClientAsyncConnectionFactory();
+    }
+    
     public AsyncSchemeRegistry getSchemeRegistry() {
         return this.schemeRegistry;
     }
@@ -149,12 +156,12 @@ public class PoolingAsyncClientConnectio
         return buf.toString();
     }
 
-    public Future<ManagedAsyncClientConnection> leaseConnection(
+    public Future<ManagedClientAsyncConnection> leaseConnection(
             final HttpRoute route,
             final Object state,
             final long connectTimeout,
             final TimeUnit tunit,
-            final FutureCallback<ManagedAsyncClientConnection> callback) {
+            final FutureCallback<ManagedClientAsyncConnection> callback) {
         if (route == null) {
             throw new IllegalArgumentException("HTTP route may not be null");
         }
@@ -164,27 +171,27 @@ public class PoolingAsyncClientConnectio
         if (this.log.isDebugEnabled()) {
             this.log.debug("Connection request: " + format(route, state) + formatStats(route));
         }
-        BasicFuture<ManagedAsyncClientConnection> future = new BasicFuture<ManagedAsyncClientConnection>(
+        BasicFuture<ManagedClientAsyncConnection> future = new BasicFuture<ManagedClientAsyncConnection>(
                 callback);
         this.pool.lease(route, state, connectTimeout, tunit, new InternalPoolEntryCallback(future));
         return future;
     }
 
     public void releaseConnection(
-            final ManagedAsyncClientConnection conn,
+            final ManagedClientAsyncConnection conn,
             final long keepalive,
             final TimeUnit tunit) {
         if (conn == null) {
             throw new IllegalArgumentException("HTTP connection may not be null");
         }
-        if (!(conn instanceof ManagedAsyncClientConnectionImpl)) {
+        if (!(conn instanceof ManagedClientAsyncConnectionImpl)) {
             throw new IllegalArgumentException("Connection class mismatch, " +
                  "connection not obtained from this manager");
         }
         if (tunit == null) {
             throw new IllegalArgumentException("Time unit may not be null");
         }
-        ManagedAsyncClientConnectionImpl managedConn = (ManagedAsyncClientConnectionImpl) conn;
+        ManagedClientAsyncConnectionImpl managedConn = (ManagedClientAsyncConnectionImpl) conn;
         ClientAsyncConnectionManager manager = managedConn.getManager();
         if (manager != null && manager != this) {
             throw new IllegalArgumentException("Connection not obtained from this manager");
@@ -290,10 +297,10 @@ public class PoolingAsyncClientConnectio
 
     class InternalPoolEntryCallback implements FutureCallback<HttpPoolEntry> {
 
-        private final BasicFuture<ManagedAsyncClientConnection> future;
+        private final BasicFuture<ManagedClientAsyncConnection> future;
 
         public InternalPoolEntryCallback(
-                final BasicFuture<ManagedAsyncClientConnection> future) {
+                final BasicFuture<ManagedClientAsyncConnection> future) {
             super();
             this.future = future;
         }
@@ -302,8 +309,9 @@ public class PoolingAsyncClientConnectio
             if (log.isDebugEnabled()) {
                 log.debug("Connection leased: " + format(entry) + formatStats(entry.getRoute()));
             }
-            ManagedAsyncClientConnection conn = new ManagedAsyncClientConnectionImpl(
-                    PoolingAsyncClientConnectionManager.this,
+            ManagedClientAsyncConnection conn = new ManagedClientAsyncConnectionImpl(
+                    PoolingClientAsyncConnectionManager.this,
+                    PoolingClientAsyncConnectionManager.this.connFactory,
                     entry);
             if (!this.future.completed(conn)) {
                 pool.release(entry, true);

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnection.java (from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnection.java?p2=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnection.java&p1=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java&r1=1242390&r2=1242391&rev=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnection.java Thu Feb  9 16:44:31 2012
@@ -30,7 +30,7 @@ import org.apache.http.HttpInetConnectio
 import org.apache.http.nio.NHttpClientConnection;
 import org.apache.http.nio.reactor.IOSession;
 
-public interface OperatedAsyncClientConnection extends NHttpClientConnection, HttpInetConnection {
+public interface ClientAsyncConnection extends NHttpClientConnection, HttpInetConnection {
 
     void upgrade(IOSession iosession);
 

Copied: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionFactory.java (from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionFactory.java?p2=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionFactory.java&p1=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java&r1=1242390&r2=1242391&rev=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/OperatedAsyncClientConnection.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionFactory.java Thu Feb  9 16:44:31 2012
@@ -26,14 +26,11 @@
  */
 package org.apache.http.nio.conn;
 
-import org.apache.http.HttpInetConnection;
-import org.apache.http.nio.NHttpClientConnection;
 import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.params.HttpParams;
 
-public interface OperatedAsyncClientConnection extends NHttpClientConnection, HttpInetConnection {
-
-    void upgrade(IOSession iosession);
-
-    IOSession getIOSession();
+public interface ClientAsyncConnectionFactory {
 
+    ClientAsyncConnection create(String id, IOSession iosession, HttpParams params);
+    
 }

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionManager.java?rev=1242391&r1=1242390&r2=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionManager.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ClientAsyncConnectionManager.java Thu Feb  9 16:44:31 2012
@@ -38,12 +38,12 @@ public interface ClientAsyncConnectionMa
 
     AsyncSchemeRegistry getSchemeRegistry();
 
-    Future<ManagedAsyncClientConnection> leaseConnection(
+    Future<ManagedClientAsyncConnection> leaseConnection(
             HttpRoute route, Object state,
             long connectTimeout, TimeUnit timeUnit,
-            FutureCallback<ManagedAsyncClientConnection> callback);
+            FutureCallback<ManagedClientAsyncConnection> callback);
 
-    void releaseConnection(ManagedAsyncClientConnection session,
+    void releaseConnection(ManagedClientAsyncConnection session,
             long validDuration, TimeUnit timeUnit);
 
 }

Copied: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedClientAsyncConnection.java (from r1242390, httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedAsyncClientConnection.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedClientAsyncConnection.java?p2=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedClientAsyncConnection.java&p1=httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedAsyncClientConnection.java&r1=1242390&r2=1242391&rev=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedAsyncClientConnection.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedClientAsyncConnection.java Thu Feb  9 16:44:31 2012
@@ -37,7 +37,7 @@ import org.apache.http.nio.NHttpClientCo
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HttpContext;
 
-public interface ManagedAsyncClientConnection
+public interface ManagedClientAsyncConnection
     extends HttpRoutedConnection, NHttpClientConnection, ConnectionReleaseTrigger {
 
     Object getState();

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedClientAsyncConnection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedClientAsyncConnection.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/conn/ManagedClientAsyncConnection.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/HttpAsyncTestBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/HttpAsyncTestBase.java?rev=1242391&r1=1242390&r2=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/HttpAsyncTestBase.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/HttpAsyncTestBase.java Thu Feb  9 16:44:31 2012
@@ -32,7 +32,7 @@ import java.io.IOException;
 import org.apache.http.HttpResponseInterceptor;
 import org.apache.http.impl.nio.DefaultNHttpServerConnection;
 import org.apache.http.impl.nio.client.DefaultHttpAsyncClient;
-import org.apache.http.impl.nio.conn.PoolingAsyncClientConnectionManager;
+import org.apache.http.impl.nio.conn.PoolingClientAsyncConnectionManager;
 import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
 import org.apache.http.localserver.HttpServerNio;
 import org.apache.http.nio.NHttpConnectionFactory;
@@ -57,7 +57,7 @@ public abstract class HttpAsyncTestBase 
     protected HttpServerNio server;
     protected HttpProcessor serverHttpProc;
     protected DefaultConnectingIOReactor ioreactor;
-    protected PoolingAsyncClientConnectionManager connMgr;
+    protected PoolingClientAsyncConnectionManager connMgr;
     protected DefaultHttpAsyncClient httpclient;
 
     protected abstract NHttpConnectionFactory<DefaultNHttpServerConnection> createServerConnectionFactory(
@@ -101,7 +101,7 @@ public abstract class HttpAsyncTestBase 
         this.ioreactor = new DefaultConnectingIOReactor();
         AsyncSchemeRegistry schemeRegistry = new AsyncSchemeRegistry();
         schemeRegistry.register(new AsyncScheme("http", 80, null));
-        this.connMgr = new PoolingAsyncClientConnectionManager(this.ioreactor, schemeRegistry);
+        this.connMgr = new PoolingClientAsyncConnectionManager(this.ioreactor, schemeRegistry);
         this.httpclient = new DefaultHttpAsyncClient(this.connMgr);
         this.httpclient.getParams()
             .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 60000)

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestStatefulConnManagement.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestStatefulConnManagement.java?rev=1242391&r1=1242390&r2=1242391&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestStatefulConnManagement.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/impl/nio/client/TestStatefulConnManagement.java Thu Feb  9 16:44:31 2012
@@ -48,7 +48,7 @@ import org.apache.http.nio.ContentDecode
 import org.apache.http.nio.IOControl;
 import org.apache.http.nio.NHttpConnectionFactory;
 import org.apache.http.nio.client.HttpAsyncClient;
-import org.apache.http.nio.conn.ManagedAsyncClientConnection;
+import org.apache.http.nio.conn.ManagedClientAsyncConnection;
 import org.apache.http.nio.entity.NStringEntity;
 import org.apache.http.nio.protocol.AbstractAsyncResponseConsumer;
 import org.apache.http.nio.protocol.BasicAsyncRequestHandler;
@@ -57,12 +57,12 @@ import org.apache.http.nio.protocol.Http
 import org.apache.http.nio.protocol.HttpAsyncRequestHandlerRegistry;
 import org.apache.http.nio.protocol.HttpAsyncRequestHandlerResolver;
 import org.apache.http.nio.protocol.HttpAsyncService;
+import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.IOReactorStatus;
 import org.apache.http.nio.reactor.ListenerEndpoint;
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
-import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpRequestHandler;
 import org.apache.http.protocol.SyncBasicHttpContext;
@@ -252,8 +252,8 @@ public class TestStatefulConnManagement 
 
                                 @Override
                                 protected Object buildResult(final HttpContext context) throws Exception {
-                                    ManagedAsyncClientConnection conn = (ManagedAsyncClientConnection) context.getAttribute(
-                                            ExecutionContext.HTTP_CONNECTION);
+                                    ManagedClientAsyncConnection conn = (ManagedClientAsyncConnection) context.getAttribute(
+                                            IOEventDispatch.CONNECTION_KEY);
                                     return conn.getState();
                                 }
 



Mime
View raw message