cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cxf git commit: Upgrading to JAX-RS 2.1-m04, updating SSE server-side implementation to accomodate API changes. Sealed SseImpl
Date Thu, 16 Feb 2017 02:51:13 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 3fc02937b -> 1b8064f47


Upgrading to JAX-RS 2.1-m04, updating SSE server-side implementation to accomodate API changes.
Sealed SseImpl


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1b8064f4
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1b8064f4
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1b8064f4

Branch: refs/heads/master
Commit: 1b8064f475b09323c5c11d9e8a4e1440879cae26
Parents: 3fc0293
Author: reta <drreta@gmail.com>
Authored: Wed Feb 15 21:50:41 2017 -0500
Committer: reta <drreta@gmail.com>
Committed: Wed Feb 15 21:50:41 2017 -0500

----------------------------------------------------------------------
 .../main/java/demo/jaxrs/sse/StatsRestServiceImpl.java   |  9 ++++++---
 .../main/java/demo/jaxrs/sse/StatsRestServiceImpl.java   |  8 ++++++--
 .../main/java/demo/jaxrs/sse/StatsRestServiceImpl.java   |  9 ++++++---
 .../src/main/java/org/apache/cxf/jaxrs/sse/SseImpl.java  |  6 +-----
 .../java/org/apache/cxf/systest/jaxrs/sse/BookStore.java | 11 ++++++-----
 5 files changed, 25 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1b8064f4/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
index 8c019af..f0fc750 100644
--- a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
+++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
@@ -33,13 +33,16 @@ import javax.ws.rs.sse.OutboundSseEvent.Builder;
 import javax.ws.rs.sse.Sse;
 import javax.ws.rs.sse.SseEventSink;
 
-import org.apache.cxf.jaxrs.sse.SseImpl;
-
 @Path("/stats")
 public class StatsRestServiceImpl {
     private static final Random RANDOM = new Random();
-    private final Sse sse = SseImpl.create();
+    private Sse sse;
 
+    @Context 
+    public void setSse(Sse sse) {
+        this.sse = sse;
+    }
+    
     @GET
     @Path("sse/{id}")
     @Produces(MediaType.SERVER_SENT_EVENTS)

http://git-wip-us.apache.org/repos/asf/cxf/blob/1b8064f4/distribution/src/main/release/samples/jax_rs/sse_spring/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/sse_spring/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
b/distribution/src/main/release/samples/jax_rs/sse_spring/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
index 6ef7360..79d4450 100644
--- a/distribution/src/main/release/samples/jax_rs/sse_spring/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
+++ b/distribution/src/main/release/samples/jax_rs/sse_spring/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
@@ -33,14 +33,18 @@ import javax.ws.rs.sse.OutboundSseEvent.Builder;
 import javax.ws.rs.sse.Sse;
 import javax.ws.rs.sse.SseEventSink;
 
-import org.apache.cxf.jaxrs.sse.SseImpl;
 import org.springframework.stereotype.Component;
 
 @Path("/stats")
 @Component
 public class StatsRestServiceImpl {
     private static final Random RANDOM = new Random();
-    private final Sse sse = SseImpl.create();
+    private Sse sse;
+    
+    @Context 
+    public void setSse(Sse sse) {
+        this.sse = sse;
+    }
 
     @GET
     @Path("sse/{id}")

http://git-wip-us.apache.org/repos/asf/cxf/blob/1b8064f4/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
index 8c019af..44914f6 100644
--- a/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
+++ b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java
@@ -33,12 +33,15 @@ import javax.ws.rs.sse.OutboundSseEvent.Builder;
 import javax.ws.rs.sse.Sse;
 import javax.ws.rs.sse.SseEventSink;
 
-import org.apache.cxf.jaxrs.sse.SseImpl;
-
 @Path("/stats")
 public class StatsRestServiceImpl {
     private static final Random RANDOM = new Random();
-    private final Sse sse = SseImpl.create();
+    private Sse sse;
+
+    @Context 
+    public void setSse(Sse sse) {
+        this.sse = sse;
+    }
 
     @GET
     @Path("sse/{id}")

http://git-wip-us.apache.org/repos/asf/cxf/blob/1b8064f4/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/SseImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/SseImpl.java b/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/SseImpl.java
index f3c6a79..17f6955 100644
--- a/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/SseImpl.java
+++ b/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/SseImpl.java
@@ -22,13 +22,9 @@ import javax.ws.rs.sse.OutboundSseEvent.Builder;
 import javax.ws.rs.sse.Sse;
 import javax.ws.rs.sse.SseBroadcaster;
 
-public class SseImpl implements Sse {
+class SseImpl implements Sse {
     SseImpl() {
     }
-    
-    public static Sse create() {
-        return new SseImpl();
-    }
 
     @Override
     public Builder newEventBuilder() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/1b8064f4/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/BookStore.java
----------------------------------------------------------------------
diff --git a/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/BookStore.java
b/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/BookStore.java
index 4c07767..1aa8a14 100644
--- a/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/BookStore.java
+++ b/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/BookStore.java
@@ -40,7 +40,6 @@ import javax.ws.rs.sse.Sse;
 import javax.ws.rs.sse.SseBroadcaster;
 import javax.ws.rs.sse.SseEventSink;
 
-import org.apache.cxf.jaxrs.sse.SseImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -48,12 +47,14 @@ import org.slf4j.LoggerFactory;
 public class BookStore {
     private static final Logger LOG = LoggerFactory.getLogger(BookStore.class);
 
-    private final Sse sse = SseImpl.create();
     private final CountDownLatch latch = new CountDownLatch(2);
-    private final SseBroadcaster broadcaster;
+    private Sse sse;
+    private SseBroadcaster broadcaster;
 
-    public BookStore() {
-        broadcaster = sse.newBroadcaster();
+    @Context 
+    public void setSse(Sse sse) {
+        this.sse = sse;
+        this.broadcaster = sse.newBroadcaster();
     }
 
     @GET


Mime
View raw message