hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1045158 - in /httpcomponents/httpasyncclient/trunk/src: examples/org/apache/http/examples/nio/client/ 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/apa...
Date Mon, 13 Dec 2010 14:56:15 GMT
Author: olegk
Date: Mon Dec 13 14:56:14 2010
New Revision: 1045158

URL: http://svn.apache.org/viewvc?rev=1045158&view=rev
Log:
Renamed several interfaces and classes

Added:
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/ClientConnAdaptor.java
      - copied, changed from r1045143, httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/PoolingClientConnectionManager.java
      - copied, changed from r1045143, httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ClientConnectionManager.java
      - copied, changed from r1045139, httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/IOSessionManager.java
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedClientConnection.java
      - copied, changed from r1045143, httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedIOSession.java
Removed:
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/IOSessionManager.java
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedIOSession.java
Modified:
    httpcomponents/httpasyncclient/trunk/src/examples/org/apache/http/examples/nio/client/AsyncClientRequest.java
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncClient.java
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
    httpcomponents/httpasyncclient/trunk/src/test/java/org/apache/http/impl/nio/client/TestHttpAsync.java

Modified: httpcomponents/httpasyncclient/trunk/src/examples/org/apache/http/examples/nio/client/AsyncClientRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/examples/org/apache/http/examples/nio/client/AsyncClientRequest.java?rev=1045158&r1=1045157&r2=1045158&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/examples/org/apache/http/examples/nio/client/AsyncClientRequest.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/examples/org/apache/http/examples/nio/client/AsyncClientRequest.java
Mon Dec 13 14:56:14 2010
@@ -33,7 +33,7 @@ import java.util.concurrent.Future;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpResponse;
 import org.apache.http.impl.nio.client.BasicHttpAsyncClient;
-import org.apache.http.impl.nio.conn.BasicIOSessionManager;
+import org.apache.http.impl.nio.conn.PoolingClientConnectionManager;
 import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
 import org.apache.http.message.BasicHttpRequest;
 import org.apache.http.nio.client.HttpAsyncClient;
@@ -53,7 +53,7 @@ public class AsyncClientRequest {
             .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.USER_AGENT, "HttpComponents/1.1");
         DefaultConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(1, params);
-        BasicIOSessionManager sessmrg = new BasicIOSessionManager(ioReactor, params);
+        PoolingClientConnectionManager sessmrg = new PoolingClientConnectionManager(ioReactor,
params);
         sessmrg.setTotalMax(5);
         sessmrg.setDefaultMaxPerHost(3);
 

Modified: httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncClient.java?rev=1045158&r1=1045157&r2=1045158&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncClient.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncClient.java
Mon Dec 13 14:56:14 2010
@@ -37,13 +37,13 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponse;
 import org.apache.http.impl.DefaultConnectionReuseStrategy;
-import org.apache.http.impl.nio.conn.BasicIOSessionManager;
+import org.apache.http.impl.nio.conn.PoolingClientConnectionManager;
 import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
 import org.apache.http.nio.client.HttpAsyncClient;
 import org.apache.http.nio.client.HttpAsyncRequestProducer;
 import org.apache.http.nio.client.HttpAsyncResponseConsumer;
 import org.apache.http.nio.concurrent.FutureCallback;
-import org.apache.http.nio.conn.IOSessionManager;
+import org.apache.http.nio.conn.ClientConnectionManager;
 import org.apache.http.nio.reactor.ConnectingIOReactor;
 import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.IOReactorException;
@@ -67,13 +67,13 @@ public class BasicHttpAsyncClient implem
     private final Log log;
     private final HttpParams params;
     private final ConnectingIOReactor ioReactor;
-    private final IOSessionManager sessmrg;
+    private final ClientConnectionManager connmgr;
 
     private Thread reactorThread;
 
     public BasicHttpAsyncClient(
             final ConnectingIOReactor ioReactor,
-            final IOSessionManager sessmrg,
+            final ClientConnectionManager connmgr,
             final HttpParams params) throws IOReactorException {
         super();
         this.log = LogFactory.getLog(getClass());
@@ -83,7 +83,7 @@ public class BasicHttpAsyncClient implem
             this.params = createDefaultHttpParams();
         }
         this.ioReactor = ioReactor;
-        this.sessmrg = sessmrg;
+        this.connmgr = connmgr;
     }
 
     public BasicHttpAsyncClient(final HttpParams params) throws IOReactorException {
@@ -95,7 +95,7 @@ public class BasicHttpAsyncClient implem
             this.params = createDefaultHttpParams();
         }
         this.ioReactor = new DefaultConnectingIOReactor(2, this.params);
-        this.sessmrg = new BasicIOSessionManager(this.ioReactor, params);
+        this.connmgr = new PoolingClientConnectionManager(this.ioReactor, params);
     }
 
     protected HttpParams createDefaultHttpParams() {
@@ -153,7 +153,7 @@ public class BasicHttpAsyncClient implem
     }
 
     public synchronized void shutdown() throws InterruptedException {
-        this.sessmrg.shutdown();
+        this.connmgr.shutdown();
         try {
             this.ioReactor.shutdown(5000);
         } catch (IOException ex) {
@@ -175,7 +175,7 @@ public class BasicHttpAsyncClient implem
                     requestProducer,
                     responseConsumer,
                     callback,
-                    this.sessmrg,
+                    this.connmgr,
                     createHttpProcessor(),
                     context,
                     this.params);

Modified: httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java?rev=1045158&r1=1045157&r2=1045158&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
Mon Dec 13 14:56:14 2010
@@ -53,8 +53,8 @@ import org.apache.http.nio.client.HttpAs
 import org.apache.http.nio.client.HttpAsyncResponseConsumer;
 import org.apache.http.nio.concurrent.BasicFuture;
 import org.apache.http.nio.concurrent.FutureCallback;
-import org.apache.http.nio.conn.IOSessionManager;
-import org.apache.http.nio.conn.ManagedIOSession;
+import org.apache.http.nio.conn.ClientConnectionManager;
+import org.apache.http.nio.conn.ManagedClientConnection;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.ExecutionContext;
@@ -68,7 +68,7 @@ class DefaultAsyncRequestDirector<T> imp
     private final HttpAsyncRequestProducer requestProducer;
     private final HttpAsyncResponseConsumer<T> responseConsumer;
     private final BasicFuture<T> resultFuture;
-    private final IOSessionManager sessmrg;
+    private final ClientConnectionManager connmgr;
     private final HttpProcessor httppocessor;
     private final HttpContext localContext;
     private final HttpParams clientParams;
@@ -76,14 +76,14 @@ class DefaultAsyncRequestDirector<T> imp
     private HttpRequest originalRequest;
     private RequestWrapper currentRequest;
     private HttpRoute route;
-    private Future<ManagedIOSession> sessionFuture;
-    private ManagedIOSession managedSession;
+    private Future<ManagedClientConnection> connFuture;
+    private ManagedClientConnection managedConn;
 
     public DefaultAsyncRequestDirector(
             final HttpAsyncRequestProducer requestProducer,
             final HttpAsyncResponseConsumer<T> responseConsumer,
             final FutureCallback<T> callback,
-            final IOSessionManager sessmrg,
+            final ClientConnectionManager connmgr,
             final HttpProcessor httppocessor,
             final HttpContext localContext,
             final HttpParams clientParams) {
@@ -91,7 +91,7 @@ class DefaultAsyncRequestDirector<T> imp
         this.requestProducer = requestProducer;
         this.responseConsumer = responseConsumer;
         this.resultFuture = new BasicFuture<T>(callback);
-        this.sessmrg = sessmrg;
+        this.connmgr = connmgr;
         this.httppocessor = httppocessor;
         this.localContext = localContext;
         this.clientParams = clientParams;
@@ -110,7 +110,7 @@ class DefaultAsyncRequestDirector<T> imp
             long connectTimeout = HttpConnectionParams.getConnectionTimeout(params);
             Object userToken = this.localContext.getAttribute(ClientContext.USER_TOKEN);
 
-            this.sessionFuture = this.sessmrg.leaseSession(
+            this.connFuture = this.connmgr.leaseSession(
                     this.route, userToken,
                     connectTimeout, TimeUnit.MILLISECONDS,
                     new InternalFutureCallback());
@@ -181,10 +181,10 @@ class DefaultAsyncRequestDirector<T> imp
 
     public synchronized void completed() {
         try {
-            if (this.managedSession != null) {
-                this.managedSession.releaseSession();
+            if (this.managedConn != null) {
+                this.managedConn.releaseSession();
             }
-            this.managedSession = null;
+            this.managedConn = null;
             this.requestProducer.resetRequest();
             this.responseConsumer.completed();
             this.resultFuture.completed(this.responseConsumer.getResult());
@@ -196,11 +196,11 @@ class DefaultAsyncRequestDirector<T> imp
 
     public synchronized void failed(final Exception ex) {
         try {
-            this.sessionFuture.cancel(true);
-            if (this.managedSession != null) {
-                this.managedSession.abortSession();
+            this.connFuture.cancel(true);
+            if (this.managedConn != null) {
+                this.managedConn.abortSession();
             }
-            this.managedSession = null;
+            this.managedConn = null;
             this.requestProducer.resetRequest();
             this.responseConsumer.failed(ex);
             this.resultFuture.failed(ex);
@@ -212,11 +212,11 @@ class DefaultAsyncRequestDirector<T> imp
 
     public synchronized void cancel() {
         try {
-            this.sessionFuture.cancel(true);
-            if (this.managedSession != null) {
-                this.managedSession.abortSession();
+            this.connFuture.cancel(true);
+            if (this.managedConn != null) {
+                this.managedConn.abortSession();
             }
-            this.managedSession = null;
+            this.managedConn = null;
             this.requestProducer.resetRequest();
             this.responseConsumer.cancel();
             this.resultFuture.cancel(true);
@@ -234,10 +234,10 @@ class DefaultAsyncRequestDirector<T> imp
         return this.responseConsumer.getResult();
     }
 
-    private synchronized void sessionRequestCompleted(final ManagedIOSession session) {
-        this.managedSession = session;
-        this.managedSession.getContext().setAttribute(HTTP_EXCHANGE_HANDLER, this);
-        this.managedSession.requestOutput();
+    private synchronized void sessionRequestCompleted(final ManagedClientConnection session)
{
+        this.managedConn = session;
+        this.managedConn.getContext().setAttribute(HTTP_EXCHANGE_HANDLER, this);
+        this.managedConn.requestOutput();
     }
 
     private synchronized void sessionRequestFailed(final Exception ex) {
@@ -258,9 +258,9 @@ class DefaultAsyncRequestDirector<T> imp
         }
     }
 
-    class InternalFutureCallback implements FutureCallback<ManagedIOSession> {
+    class InternalFutureCallback implements FutureCallback<ManagedClientConnection>
{
 
-        public void completed(final ManagedIOSession session) {
+        public void completed(final ManagedClientConnection session) {
             sessionRequestCompleted(session);
         }
 

Copied: httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/ClientConnAdaptor.java
(from r1045143, httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/ClientConnAdaptor.java?p2=httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/ClientConnAdaptor.java&p1=httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java&r1=1045143&r2=1045158&rev=1045158&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/ClientConnAdaptor.java
Mon Dec 13 14:56:14 2010
@@ -36,21 +36,21 @@ import org.apache.http.conn.routing.Http
 import org.apache.http.impl.nio.pool.PoolEntry;
 import org.apache.http.nio.NHttpClientConnection;
 import org.apache.http.nio.NHttpConnection;
-import org.apache.http.nio.conn.IOSessionManager;
-import org.apache.http.nio.conn.ManagedIOSession;
+import org.apache.http.nio.conn.ClientConnectionManager;
+import org.apache.http.nio.conn.ManagedClientConnection;
 import org.apache.http.nio.reactor.IOSession;
 import org.apache.http.protocol.HttpContext;
 
-class BasicManagedIOSession implements ManagedIOSession {
+class ClientConnAdaptor implements ManagedClientConnection {
 
-    private final IOSessionManager manager;
+    private final ClientConnectionManager manager;
     private volatile PoolEntry<HttpRoute> entry;
     private volatile NHttpClientConnection conn;
     private volatile boolean released;
     private volatile boolean reusable;
 
-    public BasicManagedIOSession(
-            final IOSessionManager manager,
+    public ClientConnAdaptor(
+            final ClientConnectionManager manager,
             final PoolEntry<HttpRoute> entry,
             final NHttpClientConnection conn) {
         super();
@@ -61,7 +61,7 @@ class BasicManagedIOSession implements M
         this.reusable = true;
     }
 
-    protected IOSessionManager getManager() {
+    protected ClientConnectionManager getManager() {
         return this.manager;
     }
 

Copied: httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/PoolingClientConnectionManager.java
(from r1045143, httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/PoolingClientConnectionManager.java?p2=httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/PoolingClientConnectionManager.java&p1=httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java&r1=1045143&r2=1045158&rev=1045158&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/conn/PoolingClientConnectionManager.java
Mon Dec 13 14:56:14 2010
@@ -40,8 +40,8 @@ import org.apache.http.impl.nio.pool.Poo
 import org.apache.http.nio.NHttpClientConnection;
 import org.apache.http.nio.concurrent.BasicFuture;
 import org.apache.http.nio.concurrent.FutureCallback;
-import org.apache.http.nio.conn.ManagedIOSession;
-import org.apache.http.nio.conn.IOSessionManager;
+import org.apache.http.nio.conn.ManagedClientConnection;
+import org.apache.http.nio.conn.ClientConnectionManager;
 import org.apache.http.nio.conn.PoolStats;
 import org.apache.http.nio.reactor.ConnectingIOReactor;
 import org.apache.http.nio.reactor.IOSession;
@@ -50,7 +50,7 @@ import org.apache.http.nio.util.HeapByte
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.ExecutionContext;
 
-public class BasicIOSessionManager implements IOSessionManager {
+public class PoolingClientConnectionManager implements ClientConnectionManager {
 
     private static final String HEADERS    = "org.apache.http.headers";
     private static final String WIRE       = "org.apache.http.wire";
@@ -60,7 +60,7 @@ public class BasicIOSessionManager imple
     private final HttpSessionPool pool;
     private final HttpParams params;
 
-    public BasicIOSessionManager(final ConnectingIOReactor ioreactor, final HttpParams params)
{
+    public PoolingClientConnectionManager(final ConnectingIOReactor ioreactor, final HttpParams
params) {
         super();
         if (ioreactor == null) {
             throw new IllegalArgumentException("I/O reactor may not be null");
@@ -72,12 +72,12 @@ public class BasicIOSessionManager imple
         this.params = params;
     }
 
-    public synchronized Future<ManagedIOSession> leaseSession(
+    public synchronized Future<ManagedClientConnection> leaseSession(
             final HttpRoute route,
             final Object state,
             final long connectTimeout,
             final TimeUnit timeUnit,
-            final FutureCallback<ManagedIOSession> callback) {
+            final FutureCallback<ManagedClientConnection> callback) {
         if (this.log.isDebugEnabled()) {
             this.log.debug("I/O session request: route[" + route + "][state: " + state +
"]");
             PoolStats totals = this.pool.getTotalStats();
@@ -85,7 +85,7 @@ public class BasicIOSessionManager imple
             this.log.debug("Total: " + totals);
             this.log.debug("Route [" + route + "]: " + stats);
         }
-        BasicFuture<ManagedIOSession> future = new BasicFuture<ManagedIOSession>(
+        BasicFuture<ManagedClientConnection> future = new BasicFuture<ManagedClientConnection>(
                 callback);
         this.pool.lease(route, state, connectTimeout, timeUnit, new InternalPoolEntryCallback(future));
         if (this.log.isDebugEnabled()) {
@@ -97,14 +97,14 @@ public class BasicIOSessionManager imple
         return future;
     }
 
-    public synchronized void releaseSession(final ManagedIOSession conn) {
-        if (!(conn instanceof BasicManagedIOSession)) {
+    public synchronized void releaseSession(final ManagedClientConnection conn) {
+        if (!(conn instanceof ClientConnAdaptor)) {
             throw new IllegalArgumentException
                 ("I/O session class mismatch, " +
                  "I/O session not obtained from this manager");
         }
-        BasicManagedIOSession adaptor = (BasicManagedIOSession) conn;
-        IOSessionManager manager = adaptor.getManager();
+        ClientConnAdaptor adaptor = (ClientConnAdaptor) conn;
+        ClientConnectionManager manager = adaptor.getManager();
         if (manager != null && manager != this) {
             throw new IllegalArgumentException
                 ("I/O session not obtained from this manager");
@@ -157,10 +157,10 @@ public class BasicIOSessionManager imple
 
     class InternalPoolEntryCallback implements PoolEntryCallback<HttpRoute> {
 
-        private final BasicFuture<ManagedIOSession> future;
+        private final BasicFuture<ManagedClientConnection> future;
 
         public InternalPoolEntryCallback(
-                final BasicFuture<ManagedIOSession> future) {
+                final BasicFuture<ManagedClientConnection> future) {
             super();
             this.future = future;
         }
@@ -195,8 +195,8 @@ public class BasicIOSessionManager imple
                 }
                 session.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
             }
-            BasicManagedIOSession result = new BasicManagedIOSession(
-                    BasicIOSessionManager.this,
+            ClientConnAdaptor result = new ClientConnAdaptor(
+                    PoolingClientConnectionManager.this,
                     entry,
                     conn);
             if (!this.future.completed(result)) {

Copied: httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ClientConnectionManager.java
(from r1045139, httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/IOSessionManager.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ClientConnectionManager.java?p2=httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ClientConnectionManager.java&p1=httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/IOSessionManager.java&r1=1045139&r2=1045158&rev=1045158&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/IOSessionManager.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ClientConnectionManager.java
Mon Dec 13 14:56:14 2010
@@ -32,14 +32,14 @@ import java.util.concurrent.TimeUnit;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.nio.concurrent.FutureCallback;
 
-public interface IOSessionManager {
+public interface ClientConnectionManager {
 
-    Future<ManagedIOSession> leaseSession(
+    Future<ManagedClientConnection> leaseSession(
             HttpRoute route, Object state,
             long connectTimeout, TimeUnit timeUnit,
-            FutureCallback<ManagedIOSession> callback);
+            FutureCallback<ManagedClientConnection> callback);
 
-    void releaseSession(ManagedIOSession session);
+    void releaseSession(ManagedClientConnection session);
 
     void shutdown();
 

Copied: httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedClientConnection.java
(from r1045143, httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedIOSession.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedClientConnection.java?p2=httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedClientConnection.java&p1=httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedIOSession.java&r1=1045143&r2=1045158&rev=1045158&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedIOSession.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/nio/conn/ManagedClientConnection.java
Mon Dec 13 14:56:14 2010
@@ -28,7 +28,7 @@ package org.apache.http.nio.conn;
 
 import org.apache.http.nio.NHttpClientConnection;
 
-public interface ManagedIOSession extends NHttpClientConnection {
+public interface ManagedClientConnection extends NHttpClientConnection {
 
     Object getState();
 

Modified: httpcomponents/httpasyncclient/trunk/src/test/java/org/apache/http/impl/nio/client/TestHttpAsync.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/test/java/org/apache/http/impl/nio/client/TestHttpAsync.java?rev=1045158&r1=1045157&r2=1045158&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/test/java/org/apache/http/impl/nio/client/TestHttpAsync.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/test/java/org/apache/http/impl/nio/client/TestHttpAsync.java
Mon Dec 13 14:56:14 2010
@@ -12,7 +12,7 @@ import org.apache.http.HttpHost;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.nio.conn.BasicIOSessionManager;
+import org.apache.http.impl.nio.conn.PoolingClientConnectionManager;
 import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
 import org.apache.http.localserver.ServerTestBase;
 import org.apache.http.nio.ContentDecoder;
@@ -33,7 +33,7 @@ import org.junit.Test;
 public class TestHttpAsync extends ServerTestBase {
 
     private HttpHost target;
-    private BasicIOSessionManager sessionManager;
+    private PoolingClientConnectionManager sessionManager;
     private HttpAsyncClient httpclient;
 
     @Before
@@ -52,7 +52,7 @@ public class TestHttpAsync extends Serve
             .setParameter(CoreProtocolPNames.USER_AGENT, "HttpComponents/1.1");
 
         ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(2, params);
-        this.sessionManager = new BasicIOSessionManager(ioReactor, params);
+        this.sessionManager = new PoolingClientConnectionManager(ioReactor, params);
         this.httpclient = new BasicHttpAsyncClient(ioReactor, this.sessionManager, params);
     }
 



Mime
View raw message