hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r385835 - in /jakarta/httpcomponents/trunk/http-core/src: java/org/apache/http/entity/ java/org/apache/http/impl/ java/org/apache/http/impl/entity/ test/org/apache/http/impl/
Date Tue, 14 Mar 2006 17:00:32 GMT
Author: olegk
Date: Tue Mar 14 09:00:29 2006
New Revision: 385835

URL: http://svn.apache.org/viewcvs?rev=385835&view=rev
Log:
Renamed methods in EntitySerializer and EntityDeserializer interfaces

Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
  (contents, props changed)
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
    jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java?rev=385835&r1=385834&r2=385835&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntityDeserializer.java
Tue Mar 14 09:00:29 2006
@@ -47,7 +47,7 @@
  */
 public interface EntityDeserializer {
 
-    HttpEntity generate(
+    HttpEntity deserialize(
             HttpDataReceiver datareceiver,
             HttpMessage message) throws HttpException, IOException;
             

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java?rev=385835&r1=385834&r2=385835&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
Tue Mar 14 09:00:29 2006
@@ -1,7 +1,7 @@
 /*
- * $HeadURL: $
- * $Revision: $
- * $Date: $
+ * $HeadURL$
+ * $Revision$
+ * $Date$
  *
  * ====================================================================
  *
@@ -41,13 +41,13 @@
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
- * @version $Revision: $
+ * @version $Revision$
  * 
  * @since 4.0
  */
 public interface EntitySerializer {
 
-    void write(
+    void serialize(
             HttpDataTransmitter datatransmitter,
             HttpMessage message,
             HttpEntity entity) throws HttpException, IOException;

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
            ('svn:executable' removed)

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/entity/EntitySerializer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java?rev=385835&r1=385834&r2=385835&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
Tue Mar 14 09:00:29 2006
@@ -180,7 +180,7 @@
         if (request.getEntity() == null) {
             return;
         }
-        this.entityserializer.write(
+        this.entityserializer.serialize(
                 this.datatransmitter,
                 request,
                 request.getEntity());
@@ -226,7 +226,7 @@
             throw new IllegalArgumentException("HTTP response may not be null");
         }
         assertOpen();
-        HttpEntity entity = this.entitydeserializer.generate(this.datareceiver, response);
+        HttpEntity entity = this.entitydeserializer.deserialize(this.datareceiver, response);
         response.setEntity(entity);
     }
     

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java?rev=385835&r1=385834&r2=385835&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
Tue Mar 14 09:00:29 2006
@@ -121,7 +121,7 @@
             throw new IllegalArgumentException("HTTP request may not be null");
         }
         assertOpen();
-        HttpEntity entity = this.entitydeserializer.generate(this.datareceiver, request);
+        HttpEntity entity = this.entitydeserializer.deserialize(this.datareceiver, request);
         request.setEntity(entity);
     }
 
@@ -166,7 +166,7 @@
         if (response.getEntity() == null) {
             return;
         }
-        this.entityserializer.write(
+        this.entityserializer.serialize(
                 this.datatransmitter,
                 response,
                 response.getEntity());

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java?rev=385835&r1=385834&r2=385835&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultClientEntitySerializer.java
Tue Mar 14 09:00:29 2006
@@ -57,7 +57,7 @@
         super();
     }
 
-    public void write(
+    public void serialize(
             final HttpDataTransmitter datatransmitter,
             final HttpMessage message,
             final HttpEntity entity) throws HttpException, IOException {

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java?rev=385835&r1=385834&r2=385835&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultEntityDeserializer.java
Tue Mar 14 09:00:29 2006
@@ -283,7 +283,7 @@
         return entity;
     }
         
-    public HttpEntity generate(
+    public HttpEntity deserialize(
             final HttpDataReceiver datareceiver,
             final HttpMessage message) throws HttpException, IOException {
         return generateEntity(datareceiver, message);

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java?rev=385835&r1=385834&r2=385835&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/entity/DefaultServerEntitySerializer.java
Tue Mar 14 09:00:29 2006
@@ -57,7 +57,7 @@
         super();
     }
 
-    public void write(
+    public void serialize(
             final HttpDataTransmitter datatransmitter,
             final HttpMessage message,
             final HttpEntity entity) throws HttpException, IOException {

Modified: jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java?rev=385835&r1=385834&r2=385835&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultEntityDeserializer.java
Tue Mar 14 09:00:29 2006
@@ -69,13 +69,13 @@
     public void testIllegalGenerateArg() throws Exception {
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
         try {
-            entitygen.generate(null, null);
+            entitygen.deserialize(null, null);
             fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             // expected
         }
         try {
-            entitygen.generate(new HttpDataReceiverMockup(new byte[] {}) , null);
+            entitygen.deserialize(new HttpDataReceiverMockup(new byte[] {}) , null);
             fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             // expected
@@ -92,7 +92,7 @@
         message.addHeader(new Header("Transfer-Encoding", "identity, chunked"));
         message.addHeader(new Header("Content-Length", "plain wrong"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
         assertTrue(entity.isChunked());
@@ -100,7 +100,7 @@
 
         // strict mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
true);
-        entity = entitygen.generate(datareceiver, message);
+        entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
         assertTrue(entity.isChunked());
@@ -118,7 +118,7 @@
         message.addHeader(new Header("Transfer-Encoding", "identity"));
         message.addHeader(new Header("Content-Length", "plain wrong"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
         assertFalse(entity.isChunked());
@@ -134,7 +134,7 @@
         message.addHeader(new Header("Transfer-Encoding", "whatever; param=value, chunked"));
         message.addHeader(new Header("Content-Length", "plain wrong"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
         assertTrue(entity.isChunked());
@@ -143,7 +143,7 @@
         // strict mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
true);
         try {
-            entitygen.generate(datareceiver, message);
+            entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -160,7 +160,7 @@
         message.addHeader(new Header("Transfer-Encoding", "chunked, identity"));
         message.addHeader(new Header("Content-Length", "plain wrong"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
         assertFalse(entity.isChunked());
@@ -169,7 +169,7 @@
         // strict mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
true);
         try {
-            entitygen.generate(datareceiver, message);
+            entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -185,7 +185,7 @@
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Content-Length", "0"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(0, entity.getContentLength());
         assertFalse(entity.isChunked());
@@ -203,7 +203,7 @@
         message.addHeader(new Header("Content-Length", "0"));
         message.addHeader(new Header("Content-Length", "1"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(1, entity.getContentLength());
         assertFalse(entity.isChunked());
@@ -214,7 +214,7 @@
         // strict mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
true);
         try {
-            entitygen.generate(datareceiver, message);
+            entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -232,7 +232,7 @@
         message.addHeader(new Header("Content-Length", "yyy"));
         message.addHeader(new Header("Content-Length", "xxx"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(1, entity.getContentLength());
         assertFalse(entity.isChunked());
@@ -243,7 +243,7 @@
         // strict mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
true);
         try {
-            entitygen.generate(datareceiver, message);
+            entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -260,7 +260,7 @@
         message.addHeader(new Header("Content-Length", "yyy"));
         message.addHeader(new Header("Content-Length", "xxx"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
         assertFalse(entity.isChunked());
@@ -272,7 +272,7 @@
         // strict mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
true);
         try {
-            entitygen.generate(datareceiver, message);
+            entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -288,7 +288,7 @@
         message.addHeader(new Header("Content-Type", "unknown"));
         message.addHeader(new Header("Content-Length", "xxx"));
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
         assertFalse(entity.isChunked());
@@ -300,7 +300,7 @@
         // strict mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
true);
         try {
-            entitygen.generate(datareceiver, message);
+            entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -314,7 +314,7 @@
         // lenient mode 
         message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING,
false);
         EntityDeserializer entitygen = new DefaultEntityDeserializer();
-        HttpEntity entity = entitygen.generate(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
         assertFalse(entity.isChunked());



Mime
View raw message