cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1367721 - in /cxf/sandbox/dkulp_async_clients/http-hc: ./ src/main/java/org/apache/cxf/transport/http/asyncclient/
Date Tue, 31 Jul 2012 19:35:50 GMT
Author: olegk
Date: Tue Jul 31 19:35:50 2012
New Revision: 1367721

URL: http://svn.apache.org/viewvc?rev=1367721&view=rev
Log:
Removed dependency on HttpClient

Modified:
    cxf/sandbox/dkulp_async_clients/http-hc/pom.xml
    cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
    cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java
    cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpRequest.java

Modified: cxf/sandbox/dkulp_async_clients/http-hc/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/pom.xml?rev=1367721&r1=1367720&r2=1367721&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/pom.xml (original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/pom.xml Tue Jul 31 19:35:50 2012
@@ -73,15 +73,9 @@
         </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>4.2.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpcore-nio</artifactId>
             <version>4.2.1</version>
         </dependency>
-
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-http-jetty</artifactId>

Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java?rev=1367721&r1=1367720&r2=1367721&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
(original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Tue Jul 31 19:35:50 2012
@@ -50,7 +50,6 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
 import org.apache.http.concurrent.FutureCallback;
 import org.apache.http.entity.BasicHttpEntity;
 import org.apache.http.entity.ContentType;
@@ -83,7 +82,7 @@ public class AsyncHTTPConduit extends HT
             httpRequestMethod = "POST";
             message.put(Message.HTTP_REQUEST_METHOD, httpRequestMethod);
         }
-        CXFEntity e = new CXFEntity(httpRequestMethod);
+        CXFHttpRequest e = new CXFHttpRequest(httpRequestMethod);
         
         BasicHttpEntity entity = new BasicHttpEntity() {
             public boolean isStreaming() {
@@ -93,9 +92,9 @@ public class AsyncHTTPConduit extends HT
         entity.setChunked(true);
         //entity.setContentLength(this.file.length());
         entity.setContentType((String)message.get(Message.CONTENT_TYPE));
-        e.setURI(uri);
+        e.setRequestURI(uri);
         e.setEntity(entity);
-        message.put(CXFEntity.class, e);
+        message.put(CXFHttpRequest.class, e);
     }
     
     
@@ -109,7 +108,7 @@ public class AsyncHTTPConduit extends HT
             chunkThreshold = 0;
             connection.setChunkedStreamingMode(-1);                    
         }
-        CXFEntity entity = message.get(CXFEntity.class);
+        CXFHttpRequest entity = message.get(CXFHttpRequest.class);
         return new AsyncWrappedOutputStream(message,
                                             needToCacheRequest, 
                                             isChunking,
@@ -120,7 +119,7 @@ public class AsyncHTTPConduit extends HT
     
     
     class AsyncWrappedOutputStream extends WrappedOutputStream {
-        CXFEntity entity;
+        CXFHttpRequest entity;
         BasicHttpEntity basicEntity; 
         boolean isAsync;
         
@@ -142,7 +141,7 @@ public class AsyncHTTPConduit extends HT
             super(message, needToCacheRequest, isChunking,
                   chunkThreshold, conduitName,
                   url);
-            entity = message.get(CXFEntity.class);
+            entity = message.get(CXFHttpRequest.class);
             basicEntity = (BasicHttpEntity)entity.getEntity();
         }
         protected void setProtocolHeaders() throws IOException {
@@ -387,8 +386,8 @@ public class AsyncHTTPConduit extends HT
         }
         
         class CXFHttpAsyncRequestProducer implements HttpAsyncRequestProducer {
-            CXFEntity entity;
-            public CXFHttpAsyncRequestProducer(CXFEntity e) {
+            CXFHttpRequest entity;
+            public CXFHttpAsyncRequestProducer(CXFHttpRequest e) {
                 entity = e;
             }
             public void close() throws IOException {
@@ -426,17 +425,4 @@ public class AsyncHTTPConduit extends HT
 
     }
     
-    static class CXFEntity extends HttpEntityEnclosingRequestBase {
-        final String method;
-        public CXFEntity(String m) {
-            super();
-            method = m;
-        }
-        public String getMethod() {
-            return method;
-        }
-    }
-
-    
-    
 }

Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java?rev=1367721&r1=1367720&r2=1367721&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java
(original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java
Tue Jul 31 19:35:50 2012
@@ -42,7 +42,7 @@ public class CXFHttpAsyncRequestProducer
     }
     
     public HttpHost getTarget() {
-        URI uri = request.getRequestURI();
+        URI uri = request.getURI();
         if (uri == null) {
             throw new IllegalStateException("Request URI is null");
         }

Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpRequest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpRequest.java?rev=1367721&r1=1367720&r2=1367721&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpRequest.java
(original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpRequest.java
Tue Jul 31 19:35:50 2012
@@ -35,7 +35,7 @@ class CXFHttpRequest extends AbstractHtt
 
     private final String method;
     
-    private URI requestURI;
+    private URI uri;
     private HttpEntity entity;
 
     public CXFHttpRequest(final String method) {
@@ -43,12 +43,12 @@ class CXFHttpRequest extends AbstractHtt
         this.method = method;
     }
     
-    public URI getRequestURI() {
-        return requestURI;
+    public URI getURI() {
+        return uri;
     }
 
-    public void setRequestURI(final URI requestURI) {
-        this.requestURI = requestURI;
+    public void setURI(final URI uri) {
+        this.uri = uri;
     }
 
     public String getMethod() {
@@ -59,7 +59,7 @@ class CXFHttpRequest extends AbstractHtt
     public RequestLine getRequestLine() {
         return new BasicRequestLine(
                 method, 
-                requestURI != null ? requestURI.toASCIIString() : "/", 
+                uri != null ? uri.toASCIIString() : "/", 
                 HttpVersion.HTTP_1_1);
     }
 



Mime
View raw message