File tree Expand file tree Collapse file tree 6 files changed +8
-38
lines changed
src/main/java/org/javaee8/sse Expand file tree Collapse file tree 6 files changed +8
-38
lines changed Original file line number Diff line number Diff line change 316316
317317 <dependencies >
318318
319+ <!-- Yasson (JSON-B RI) -->
320+ <dependency >
321+ <groupId >org.eclipse</groupId >
322+ <artifactId >yasson</artifactId >
323+ <version >1.0</version >
324+ <scope >runtime</scope >
325+ </dependency >
326+
319327 <!-- WebSocket client dependencies -->
320328 <dependency >
321329 <groupId >org.glassfish.tyrus</groupId >
Original file line number Diff line number Diff line change 2222 <artifactId >test-utils</artifactId >
2323 <version >${project.version} </version >
2424 </dependency >
25- <dependency >
26- <groupId >org.glassfish.jersey.media</groupId >
27- <artifactId >jersey-media-sse</artifactId >
28- <version >2.26</version >
29- </dependency >
30- <dependency >
31- <groupId >javax.ws.rs</groupId >
32- <artifactId >javax.ws.rs-api</artifactId >
33- <version >2.1</version >
34- </dependency >
3525 </dependencies >
3626</project >
Original file line number Diff line number Diff line change 1111 <packaging >war</packaging >
1212 <name >Java EE 8 Samples: Server Sent Events [Producer]</name >
1313 <dependencies >
14- <!-- JSON-B API -->
15- <dependency >
16- <groupId >javax.json.bind</groupId >
17- <artifactId >javax.json.bind-api</artifactId >
18- <version >1.0.0-RC2</version >
19- </dependency >
20-
21- <!-- Yasson (JSON-B RI) -->
22- <dependency >
23- <groupId >org.eclipse</groupId >
24- <artifactId >yasson</artifactId >
25- <version >1.0.0-RC1</version >
26- <scope >runtime</scope >
27- </dependency >
2814 </dependencies >
2915</project >
Original file line number Diff line number Diff line change 1- /*
2- * To change this license header, choose License Headers in Project Properties.
3- * To change this template file, choose Tools | Templates
4- * and open the template in the editor.
5- */
61package org .javaee8 .sse .data ;
72
83import java .util .Date ;
@@ -20,11 +15,9 @@ public class EventData {
2015 private String comment ;
2116
2217 public EventData () {
23- super ();
2418 }
2519
2620 public EventData (String comment ) {
27- super ();
2821 this .setTime (new Date ());
2922 this .setId (UUID .randomUUID ().toString ());
3023 this .setComment (comment );
Original file line number Diff line number Diff line change 11package org .javaee8 .sse .producer ;
22
33import javax .annotation .PostConstruct ;
4- import javax .inject .Singleton ;
54import javax .json .bind .Jsonb ;
65import javax .json .bind .JsonbBuilder ;
76import javax .ws .rs .GET ;
1817 * @author Daniel Contreras
1918 */
2019@ Path ("sse" )
21- @ Singleton
2220public class SseResource {
2321
2422 @ Context
Original file line number Diff line number Diff line change 1- /*
2- * To change this license header, choose License Headers in Project Properties.
3- * To change this template file, choose Tools | Templates
4- * and open the template in the editor.
5- */
61package org .javaee8 .sse .rest ;
72
83import javax .ws .rs .ApplicationPath ;
You can’t perform that action at this time.
0 commit comments