cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1404108 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AsyncResponseImpl.java systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java
Date Wed, 31 Oct 2012 12:15:03 GMT
Author: sergeyb
Date: Wed Oct 31 12:15:03 2012
New Revision: 1404108

URL: http://svn.apache.org/viewvc?rev=1404108&view=rev
Log:
Removing references to ResumeCallback which is about to be dropped from api

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AsyncResponseImpl.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AsyncResponseImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AsyncResponseImpl.java?rev=1404108&r1=1404107&r2=1404108&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AsyncResponseImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AsyncResponseImpl.java
Wed Oct 31 12:15:03 2012
@@ -21,7 +21,6 @@ package org.apache.cxf.jaxrs.impl;
 import java.util.Date;
 import java.util.concurrent.TimeUnit;
 
-import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.container.CompletionCallback;
 import javax.ws.rs.container.ResumeCallback;
@@ -50,7 +49,6 @@ public class AsyncResponseImpl implement
     private TimeoutHandler timeoutHandler;
     
     private CompletionCallback completionCallback;
-    private ResumeCallback resumeCallback;
     
     public AsyncResponseImpl(Message inMessage) {
         inMessage.put(AsyncResponse.class, this);
@@ -171,9 +169,6 @@ public class AsyncResponseImpl implement
             if (cls == CompletionCallback.class && callback instanceof CompletionCallback)
{
                 completionCallback = (CompletionCallback)callback;
                 result[i] = true;
-            } else if (cls == ResumeCallback.class && callback instanceof ResumeCallback)
{
-                resumeCallback = (ResumeCallback)callback;
-                result[i] = true;
             } else {
                 result[i] = false;
             }
@@ -204,13 +199,6 @@ public class AsyncResponseImpl implement
         if (!(obj instanceof Response) && !(obj instanceof Throwable)) {
             obj = Response.ok().entity(obj).build();    
         }
-        if (resumeCallback != null) {    
-            if (obj instanceof Response) {
-                resumeCallback.onResume(this, (Response)obj);
-            } else {
-                resumeCallback.onResume(this, (Throwable)obj);
-            }
-        }
         return obj;
     }
     
@@ -228,8 +216,6 @@ public class AsyncResponseImpl implement
                 suspend();
                 timeoutHandler.handleTimeout(this);
                 return true;
-            } else if (resumeCallback != null) {
-                resumeCallback.onResume(this, new WebApplicationException(503));    
             }
         }
         return false;

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java?rev=1404108&r1=1404107&r2=1404108&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java
Wed Oct 31 12:15:03 2012
@@ -32,9 +32,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.container.CompletionCallback;
-import javax.ws.rs.container.ResumeCallback;
 import javax.ws.rs.container.TimeoutHandler;
-import javax.ws.rs.core.Response;
 
 @Path("/bookstore")
 public class BookContinuationStore {
@@ -120,7 +118,7 @@ public class BookContinuationStore {
         
     }
     
-    private class CallbackImpl implements CompletionCallback, ResumeCallback {
+    private class CallbackImpl implements CompletionCallback {
 
         @Override
         public void onComplete() {
@@ -132,16 +130,6 @@ public class BookContinuationStore {
         public void onError(Throwable throwable) {
             System.out.println("CompletionCallback: onError");
         }
-
-        @Override
-        public void onResume(AsyncResponse resuming, Response response) {
-            System.out.println("ResumeCallback: onResume");
-        }
-
-        @Override
-        public void onResume(AsyncResponse resuming, Throwable error) {
-            System.out.println("ResumeCallback: onResumeError");
-        }
         
     }
 }



Mime
View raw message