hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r817785 - in /httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio: client/ conn/ pool/
Date Tue, 22 Sep 2009 19:27:39 GMT
Author: olegk
Date: Tue Sep 22 19:27:36 2009
New Revision: 817785

URL: http://svn.apache.org/viewvc?rev=817785&view=rev
Log:
Fixed tabs

Modified:
    httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/client/InternalRequestExecutionHandler.java
    httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java
    httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java
    httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java
    httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingNHttpClientConnection.java
    httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/pool/SessionPool.java

Modified: httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/client/InternalRequestExecutionHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/client/InternalRequestExecutionHandler.java?rev=817785&r1=817784&r2=817785&view=diff
==============================================================================
--- httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/client/InternalRequestExecutionHandler.java
(original)
+++ httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/client/InternalRequestExecutionHandler.java
Tue Sep 22 19:27:36 2009
@@ -64,14 +64,14 @@
     }
     
     public ConsumingNHttpEntity responseEntity(
-    		final HttpResponse response, final HttpContext context) throws IOException {
+            final HttpResponse response, final HttpContext context) throws IOException {
         return new BufferingNHttpEntity(
                 response.getEntity(),
                 new HeapByteBufferAllocator());
     }
 
     public void handleResponse(
-    		final HttpResponse response, final HttpContext context) throws IOException {
+            final HttpResponse response, final HttpContext context) throws IOException {
         HttpExchangeImpl httpx = (HttpExchangeImpl) context.removeAttribute(HTTP_EXCHANGE);
         if (httpx != null) {
             httpx.completed(response);

Modified: httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java?rev=817785&r1=817784&r2=817785&view=diff
==============================================================================
--- httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java
(original)
+++ httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicIOSessionManager.java
Tue Sep 22 19:27:36 2009
@@ -72,7 +72,7 @@
         if (this.log.isDebugEnabled()) {
             if (!future.isDone()) {
                 this.log.debug("I/O session could not be allocated immediately: " +
-                		"route[" + route + "][state: " + state + "]");
+                        "route[" + route + "][state: " + state + "]");
             }
         }
         return future;
@@ -112,15 +112,15 @@
     }
     
     public void setTotalMax(int max) {
-    	this.pool.setTotalMax(max);
+        this.pool.setTotalMax(max);
     }
 
     public void setDefaultMaxPerHost(int max) {
-    	this.pool.setDefaultMaxPerHost(max);
+        this.pool.setDefaultMaxPerHost(max);
     }
 
     public void setMaxPerHost(final HttpRoute route, int max) {
-    	this.pool.setMaxPerHost(route, max);
+        this.pool.setMaxPerHost(route, max);
     }
     
     public synchronized void shutdown() {

Modified: httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java?rev=817785&r1=817784&r2=817785&view=diff
==============================================================================
--- httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java
(original)
+++ httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/BasicManagedIOSession.java
Tue Sep 22 19:27:36 2009
@@ -120,15 +120,15 @@
     @Override
     public String toString() {
         HttpRoute route = this.entry.getRoute();
-    	StringBuilder buffer = new StringBuilder();
+        StringBuilder buffer = new StringBuilder();
         buffer.append("HTTP connection: ");
         if (route.getLocalAddress() != null) {
             buffer.append(route.getLocalAddress());
             buffer.append("->");
         }
         for (int i = 0; i < route.getHopCount(); i++) {
-        	buffer.append(route.getHopTarget(i));
-        	buffer.append("->");
+            buffer.append(route.getHopTarget(i));
+            buffer.append("->");
         }
         buffer.append(route.getTargetHost());
         if (this.released) {

Modified: httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java?rev=817785&r1=817784&r2=817785&view=diff
==============================================================================
--- httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java
(original)
+++ httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java
Tue Sep 22 19:27:36 2009
@@ -193,11 +193,11 @@
                 log.debug("I/O session " + id + " " + session + ": " + bytesRead + " bytes
read");
             }
             if (bytesRead > 0 && wirelog.isEnabled()) {
-            	ByteBuffer b = dst.duplicate();
-            	int p = b.position();
-            	b.limit(p);
-            	b.position(p - bytesRead);
-            	wirelog.input(b);
+                ByteBuffer b = dst.duplicate();
+                int p = b.position();
+                b.limit(p);
+                b.position(p - bytesRead);
+                wirelog.input(b);
             }
             return bytesRead;
         }
@@ -208,11 +208,11 @@
                 log.debug("I/O session " + id + " " + session + ": " + byteWritten + " bytes
written");
             }
             if (byteWritten > 0 && wirelog.isEnabled()) {
-            	ByteBuffer b = src.duplicate();
-            	int p = b.position();
-            	b.limit(p);
-            	b.position(p - byteWritten);
-            	wirelog.output(b);
+                ByteBuffer b = src.duplicate();
+                int p = b.position();
+                b.limit(p);
+                b.position(p - byteWritten);
+                wirelog.output(b);
             }
             return byteWritten;
         }

Modified: httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingNHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingNHttpClientConnection.java?rev=817785&r1=817784&r2=817785&view=diff
==============================================================================
--- httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingNHttpClientConnection.java
(original)
+++ httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/conn/LoggingNHttpClientConnection.java
Tue Sep 22 19:27:36 2009
@@ -50,91 +50,91 @@
     private final Log headerlog;
 
     public LoggingNHttpClientConnection(
-    		final Log headerlog,
+            final Log headerlog,
             final IOSession iosession,
             final HttpResponseFactory responseFactory,
             final ByteBufferAllocator allocator,
             final HttpParams params) {
         super(iosession, responseFactory, allocator, params);
         this.headerlog = headerlog;
-	}
+    }
 
     @Override
-	protected NHttpMessageWriter createRequestWriter(
-			final SessionOutputBuffer buffer, 
-			final HttpParams params) {
-		return new LoggingNHttpMessageWriter(
-		        super.createRequestWriter(buffer, params));
-	}
-
-	@Override
-	protected NHttpMessageParser createResponseParser(
-			final SessionInputBuffer buffer, 
-			final HttpResponseFactory responseFactory,
-			final HttpParams params) {
-		return new LoggingNHttpMessageParser(
-		        super.createResponseParser(buffer, responseFactory, params));
-	}
-
-	class LoggingNHttpMessageWriter implements NHttpMessageWriter {
-
-		private final NHttpMessageWriter writer;
-		
-		public LoggingNHttpMessageWriter(final NHttpMessageWriter writer) {
-			super();
-			this.writer = writer;
-		}
-		
-		public void reset() {
-			this.writer.reset();
-		}
-
-		public void write(final HttpMessage message) throws IOException, HttpException {
-	        if (message != null && headerlog.isDebugEnabled()) {
-	        	HttpRequest request = (HttpRequest) message; 
-	            headerlog.debug(">> " + request.getRequestLine().toString());
-	            Header[] headers = request.getAllHeaders();
-	            for (int i = 0; i < headers.length; i++) {
-	                headerlog.debug(">> " + headers[i].toString());
-	            }
-	        }
-	        this.writer.write(message);
-		}
-		
-	}
-	
-	class LoggingNHttpMessageParser implements NHttpMessageParser {
-
-		private final NHttpMessageParser parser;
-		
-		public LoggingNHttpMessageParser(final NHttpMessageParser parser) {
-			super();
-			this.parser = parser;
-		}
-		
-		public void reset() {
-			this.parser.reset();
-		}
-
-		public int fillBuffer(final ReadableByteChannel channel) throws IOException {
-			return this.parser.fillBuffer(channel);
-		}
-
-		public HttpMessage parse() throws IOException, HttpException {
-			HttpMessage message = this.parser.parse();
-			if (headerlog.isDebugEnabled()) {
-				HttpResponse response = (HttpResponse) message; 
-		        if (response != null && headerlog.isDebugEnabled()) {
-		            headerlog.debug("<< " + response.getStatusLine().toString());
-		            Header[] headers = response.getAllHeaders();
-		            for (int i = 0; i < headers.length; i++) {
-		                headerlog.debug("<< " + headers[i].toString());
-		            }
-		        }
-			}
-			return message;
-		}
-		
-	}
+    protected NHttpMessageWriter createRequestWriter(
+            final SessionOutputBuffer buffer, 
+            final HttpParams params) {
+        return new LoggingNHttpMessageWriter(
+                super.createRequestWriter(buffer, params));
+    }
+
+    @Override
+    protected NHttpMessageParser createResponseParser(
+            final SessionInputBuffer buffer, 
+            final HttpResponseFactory responseFactory,
+            final HttpParams params) {
+        return new LoggingNHttpMessageParser(
+                super.createResponseParser(buffer, responseFactory, params));
+    }
+
+    class LoggingNHttpMessageWriter implements NHttpMessageWriter {
+
+        private final NHttpMessageWriter writer;
+        
+        public LoggingNHttpMessageWriter(final NHttpMessageWriter writer) {
+            super();
+            this.writer = writer;
+        }
+        
+        public void reset() {
+            this.writer.reset();
+        }
+
+        public void write(final HttpMessage message) throws IOException, HttpException {
+            if (message != null && headerlog.isDebugEnabled()) {
+                HttpRequest request = (HttpRequest) message; 
+                headerlog.debug(">> " + request.getRequestLine().toString());
+                Header[] headers = request.getAllHeaders();
+                for (int i = 0; i < headers.length; i++) {
+                    headerlog.debug(">> " + headers[i].toString());
+                }
+            }
+            this.writer.write(message);
+        }
+        
+    }
+    
+    class LoggingNHttpMessageParser implements NHttpMessageParser {
+
+        private final NHttpMessageParser parser;
+        
+        public LoggingNHttpMessageParser(final NHttpMessageParser parser) {
+            super();
+            this.parser = parser;
+        }
+        
+        public void reset() {
+            this.parser.reset();
+        }
+
+        public int fillBuffer(final ReadableByteChannel channel) throws IOException {
+            return this.parser.fillBuffer(channel);
+        }
+
+        public HttpMessage parse() throws IOException, HttpException {
+            HttpMessage message = this.parser.parse();
+            if (headerlog.isDebugEnabled()) {
+                HttpResponse response = (HttpResponse) message; 
+                if (response != null && headerlog.isDebugEnabled()) {
+                    headerlog.debug("<< " + response.getStatusLine().toString());
+                    Header[] headers = response.getAllHeaders();
+                    for (int i = 0; i < headers.length; i++) {
+                        headerlog.debug("<< " + headers[i].toString());
+                    }
+                }
+            }
+            return message;
+        }
+        
+    }
 
 }

Modified: httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/pool/SessionPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/pool/SessionPool.java?rev=817785&r1=817784&r2=817785&view=diff
==============================================================================
--- httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/pool/SessionPool.java
(original)
+++ httpcomponents/asynchttpclient/trunk/src/main/java/org/apache/http/impl/nio/pool/SessionPool.java
Tue Sep 22 19:27:36 2009
@@ -359,7 +359,7 @@
         return super.toString();
     }
 
-	class InternalSessionRequestCallback implements SessionRequestCallback {
+    class InternalSessionRequestCallback implements SessionRequestCallback {
 
         public void completed(final SessionRequest request) {
             requestCompleted(request);



Mime
View raw message