hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1103376 - in /httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn: DefaultClientConnection.java LoggingIOSession.java Wire.java
Date Sun, 15 May 2011 13:52:52 GMT
Author: olegk
Date: Sun May 15 13:52:51 2011
New Revision: 1103376

URL: http://svn.apache.org/viewvc?rev=1103376&view=rev
Log:
Made wire log classes public

Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientConnection.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/Wire.java

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientConnection.java?rev=1103376&r1=1103375&r2=1103376&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientConnection.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientConnection.java
Sun May 15 13:52:51 2011
@@ -64,7 +64,7 @@ public class DefaultClientConnection
         super(iosession, responseFactory, allocator, params);
         this.log = LogFactory.getLog(iosession.getClass());
         if (this.log.isDebugEnabled() || this.wirelog.isDebugEnabled()) {
-            this.session = new LoggingIOSession(iosession, this.log, this.wirelog);
+            this.session = new LoggingIOSession(iosession, this.log, this.wirelog, "http-outgoing");
         }
         if (iosession instanceof SSLIOSession) {
             this.ssliosession = (SSLIOSession) iosession;
@@ -76,7 +76,8 @@ public class DefaultClientConnection
     public void upgrade(final IOSession iosession) {
         this.session.setBufferStatus(null);
         if (this.log.isDebugEnabled() || this.wirelog.isDebugEnabled()) {
-            this.session = new LoggingIOSession(iosession, this.headerlog, this.wirelog);
+            this.session = new LoggingIOSession(iosession, this.headerlog, this.wirelog,
+                    iosession instanceof SSLIOSession ? "https-outgoing" : "http-outgoing");
         } else {
             this.session = iosession;
         }

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java?rev=1103376&r1=1103375&r2=1103376&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/LoggingIOSession.java
Sun May 15 13:52:51 2011
@@ -38,7 +38,7 @@ import org.apache.commons.logging.Log;
 import org.apache.http.nio.reactor.IOSession;
 import org.apache.http.nio.reactor.SessionBufferStatus;
 
-class LoggingIOSession implements IOSession {
+public class LoggingIOSession implements IOSession {
 
     private static AtomicLong COUNT = new AtomicLong(0);
 
@@ -48,7 +48,7 @@ class LoggingIOSession implements IOSess
     private final ByteChannel channel;
     private final String id;
 
-    public LoggingIOSession(final IOSession session, final Log log, final Log wirelog) {
+    public LoggingIOSession(final IOSession session, final Log log, final Log wirelog, final
String id) {
         super();
         if (session == null) {
             throw new IllegalArgumentException("I/O session may not be null");
@@ -57,7 +57,7 @@ class LoggingIOSession implements IOSess
         this.wirelog = new Wire(wirelog);
         this.session = session;
         this.channel = new LoggingByteChannel();
-        this.id = Long.toString(COUNT.incrementAndGet());
+        this.id = id + "-" + COUNT.incrementAndGet();
     }
 
     public ByteChannel channel() {

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/Wire.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/Wire.java?rev=1103376&r1=1103375&r2=1103376&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/Wire.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/Wire.java
Sun May 15 13:52:51 2011
@@ -30,7 +30,7 @@ import java.nio.ByteBuffer;
 
 import org.apache.commons.logging.Log;
 
-class Wire {
+public class Wire {
 
     private final Log log;
 



Mime
View raw message