hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r515216 - in /jakarta/httpcomponents/httpcore/trunk: module-main/src/main/java/org/apache/http/impl/ module-nio/src/main/java/org/apache/http/impl/nio/ module-nio/src/main/java/org/apache/http/impl/nio/codecs/ module-nio/src/main/java/org/a...
Date Tue, 06 Mar 2007 17:17:21 GMT
Author: olegk
Date: Tue Mar  6 09:17:20 2007
New Revision: 515216

URL: http://svn.apache.org/viewvc?view=rev&rev=515216
Log:
Tweaked existing Object#toString() methods. Added some more

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpClientConnection.java
Tue Mar  6 09:17:20 2007
@@ -60,15 +60,13 @@
 
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("HTTP client connection (");
+        buffer.append("[");
         if (isOpen()) {
-            buffer.append(this.socket.getLocalAddress());
-            buffer.append("->");
             buffer.append(this.socket.getInetAddress());
         } else {
             buffer.append("closed");
         }
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/DefaultHttpServerConnection.java
Tue Mar  6 09:17:20 2007
@@ -58,15 +58,13 @@
 
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("HTTP server connection (");
+        buffer.append("[");
         if (isOpen()) {
-            buffer.append(this.socket.getLocalAddress());
-            buffer.append("->");
             buffer.append(this.socket.getInetAddress());
         } else {
             buffer.append("closed");
         }
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnection.java
Tue Mar  6 09:17:20 2007
@@ -201,15 +201,13 @@
     
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("HTTP client connection (");
+        buffer.append("[");
         if (isOpen()) {
-            buffer.append(this.session.getLocalAddress());
-            buffer.append("->");
             buffer.append(this.session.getRemoteAddress());
         } else {
             buffer.append("closed");
         }
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnection.java
Tue Mar  6 09:17:20 2007
@@ -200,15 +200,13 @@
     
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("HTTP server connection (");
+        buffer.append("[");
         if (isOpen()) {
-            buffer.append(this.session.getLocalAddress());
-            buffer.append("->");
             buffer.append(this.session.getRemoteAddress());
         } else {
             buffer.append("closed");
         }
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
Tue Mar  6 09:17:20 2007
@@ -229,9 +229,9 @@
 
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("Chunk decoder (completed: ");
+        buffer.append("[chunk-coded; completed: ");
         buffer.append(this.completed);
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java
Tue Mar  6 09:17:20 2007
@@ -80,9 +80,9 @@
     
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("Chunk encoder (completed: ");
+        buffer.append("[chunk-coded; completed: ");
         buffer.append(this.completed);
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
Tue Mar  6 09:17:20 2007
@@ -65,9 +65,9 @@
 
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("Identity decoder (completed: ");
+        buffer.append("[identity; completed: ");
         buffer.append(this.completed);
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
Tue Mar  6 09:17:20 2007
@@ -57,9 +57,9 @@
  
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("Identity encoder (completed: ");
+        buffer.append("[identity; completed: ");
         buffer.append(this.completed);
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
Tue Mar  6 09:17:20 2007
@@ -87,13 +87,13 @@
 
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("Length delimited decoder (content length: ");
+        buffer.append("[content length: ");
         buffer.append(this.contentLength);
         buffer.append("; pos: ");
         buffer.append(this.len);
         buffer.append("; completed: ");
         buffer.append(this.completed);
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
Tue Mar  6 09:17:20 2007
@@ -81,13 +81,13 @@
 
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        buffer.append("Length delimited encoder (content length: ");
+        buffer.append("[content length: ");
         buffer.append(this.contentLength);
         buffer.append("; pos: ");
         buffer.append(this.len);
         buffer.append("; completed: ");
         buffer.append(this.completed);
-        buffer.append(")");
+        buffer.append("]");
         return buffer.toString();
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java?view=diff&rev=515216&r1=515215&r2=515216
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
Tue Mar  6 09:17:20 2007
@@ -180,4 +180,19 @@
         this.attributes.put(name, obj);
     }
 
+    public String toString() {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("[");
+        if (this.key.isValid()) {
+            buffer.append("event mask: ");
+            buffer.append(this.key.interestOps());
+            buffer.append("; ready ops: ");
+            buffer.append(this.key.readyOps());
+        } else {
+            buffer.append("invalid");
+        }
+        buffer.append("]");
+        return buffer.toString();
+    }
+
 }



Mime
View raw message