cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1469265 - /cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
Date Thu, 18 Apr 2013 10:16:33 GMT
Author: sergeyb
Date: Thu Apr 18 10:16:33 2013
New Revision: 1469265

URL: http://svn.apache.org/r1469265
Log:
[CXF-4972] Moving Retryable invoke method out of WebClient API

Modified:
    cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java

Modified: cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java?rev=1469265&r1=1469264&r2=1469265&view=diff
==============================================================================
--- cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java (original)
+++ cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java Thu
Apr 18 10:16:33 2013
@@ -93,7 +93,7 @@ import org.apache.cxf.transport.MessageO
  * Common proxy and http-centric client implementation
  *
  */
-public abstract class AbstractClient implements Client, Retryable {
+public abstract class AbstractClient implements Client {
     protected static final String REQUEST_CONTEXT = "RequestContext";
     protected static final String RESPONSE_CONTEXT = "ResponseContext";
     protected static final String KEEP_CONDUIT_ALIVE = "KeepConduitAlive";
@@ -590,8 +590,8 @@ public abstract class AbstractClient imp
     }
     
     @SuppressWarnings("unchecked")
-    public Object[] invoke(BindingOperationInfo oi, Object[] params, Map<String, Object>
context,
-                           Exchange exchange) throws Exception {
+    protected Object[] retryInvoke(BindingOperationInfo oi, Object[] params, Map<String,
Object> context,
+                              Exchange exchange) throws Exception {
         
         try {
             Object body = params.length == 0 ? null : params[0];
@@ -886,7 +886,7 @@ public abstract class AbstractClient imp
         exchange = createExchange(m, exchange);
         exchange.put(Message.REST_MESSAGE, Boolean.TRUE);
         exchange.setOneWay("true".equals(headers.getFirst(Message.ONE_WAY_REQUEST)));
-        exchange.put(Retryable.class, this);
+        exchange.put(Retryable.class, new RetryableImpl());
         
         // context
         setContexts(m, exchange, invocationContext, proxy);
@@ -994,4 +994,13 @@ public abstract class AbstractClient imp
                                             Annotation[] customAnns,
                                             OutputStream os) throws Fault;
     }
+    
+    private class RetryableImpl implements Retryable {
+
+        public Object[] invoke(BindingOperationInfo oi, Object[] params, Map<String, Object>
context,
+                               Exchange exchange) throws Exception {
+            return AbstractClient.this.retryInvoke(oi, params, context, exchange);
+        }
+        
+    }
 }



Mime
View raw message