geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r601456 - /geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/AsyncHttpClient.java
Date Wed, 05 Dec 2007 18:10:21 GMT
Author: adc
Date: Wed Dec  5 10:10:21 2007
New Revision: 601456

URL: http://svn.apache.org/viewvc?rev=601456&view=rev
Log:
No need for reference

Modified:
    geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/AsyncHttpClient.java

Modified: geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/AsyncHttpClient.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/AsyncHttpClient.java?rev=601456&r1=601455&r2=601456&view=diff
==============================================================================
--- geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/AsyncHttpClient.java (original)
+++ geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/AsyncHttpClient.java Wed
Dec  5 10:10:21 2007
@@ -64,7 +64,7 @@
     /** The Default Send Buffer Size. */
     private static final int DEFAULT_SEND_BUFFER_SIZE = 1024;
 
-    /** The Default Traffic Class  */
+    /** The Default Traffic Class */
     private static final int DEFAULT_TRAFFIC_CLASS = 0;
 
     /** The Default Keep Alive. */
@@ -334,7 +334,7 @@
         String host = message.getHost();
         int port = message.getPort();
         ConnectFuture future = connector.connect(new InetSocketAddress(host, port), handler);
-        future.addListener(new FutureListener(this, message));
+        future.addListener(new FutureListener(message));
     }
 
     /**
@@ -357,15 +357,13 @@
         applyConnectionTimeout();
     }
 
-    /**
-     * Apply connection timeout.
-     */
+    /** Apply connection timeout. */
     private void applyConnectionTimeout() {
         connector.getDefaultConfig().setConnectTimeout(connectionTimeout / 1000);
     }
 
     /**
-     * Shuts down the AsyncHttpClient object and shuts any associated thread pools.  SHould
always be called when the application is
+     * Shuts down the AsyncHttpClient object and shuts any associated thread pools.  Should
always be called when the application is
      * done using the object or a hang can occur.
      */
     public void destroyAll() {
@@ -388,24 +386,15 @@
      */
     class FutureListener implements IoFutureListener {
 
-        /**
-         * The request.
-         */
-        HttpRequestMessage request;
-
-        /**
-         * The client.
-         */
-        AsyncHttpClient client;
+        /** The request. */
+        final HttpRequestMessage request;
 
         /**
          * Instantiates a new future listener for a connection.
          *
-         * @param client  the <code>AsyncHttpClient</code> client object
          * @param request the <code>HttpRequestMessage</code> request that is
to be sent.
          */
-        public FutureListener(AsyncHttpClient client, HttpRequestMessage request) {
-            this.client = client;
+        public FutureListener(HttpRequestMessage request) {
             this.request = request;
         }
 
@@ -445,7 +434,7 @@
 
                 sess.setAttribute(HttpIoHandler.CURRENT_REQUEST, request);
 
-                sess.setAttachment(client);
+                sess.setAttachment(AsyncHttpClient.this);
 
                 //Set the socket parameters on successfully obtaining the session
                 SocketSessionConfig config = (SocketSessionConfig) sess.getConfig();



Mime
View raw message