File tree 6 files changed +8
-38
lines changed
src/main/java/org/javaee8/sse
6 files changed +8
-38
lines changed Original file line number Diff line number Diff line change 316
316
317
317
<dependencies >
318
318
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
+
319
327
<!-- WebSocket client dependencies -->
320
328
<dependency >
321
329
<groupId >org.glassfish.tyrus</groupId >
Original file line number Diff line number Diff line change 22
22
<artifactId >test-utils</artifactId >
23
23
<version >${project.version} </version >
24
24
</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 >
35
25
</dependencies >
36
26
</project >
Original file line number Diff line number Diff line change 11
11
<packaging >war</packaging >
12
12
<name >Java EE 8 Samples: Server Sent Events [Producer]</name >
13
13
<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 >
28
14
</dependencies >
29
15
</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
- */
6
1
package org .javaee8 .sse .data ;
7
2
8
3
import java .util .Date ;
@@ -20,11 +15,9 @@ public class EventData {
20
15
private String comment ;
21
16
22
17
public EventData () {
23
- super ();
24
18
}
25
19
26
20
public EventData (String comment ) {
27
- super ();
28
21
this .setTime (new Date ());
29
22
this .setId (UUID .randomUUID ().toString ());
30
23
this .setComment (comment );
Original file line number Diff line number Diff line change 1
1
package org .javaee8 .sse .producer ;
2
2
3
3
import javax .annotation .PostConstruct ;
4
- import javax .inject .Singleton ;
5
4
import javax .json .bind .Jsonb ;
6
5
import javax .json .bind .JsonbBuilder ;
7
6
import javax .ws .rs .GET ;
18
17
* @author Daniel Contreras
19
18
*/
20
19
@ Path ("sse" )
21
- @ Singleton
22
20
public class SseResource {
23
21
24
22
@ 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
- */
6
1
package org .javaee8 .sse .rest ;
7
2
8
3
import javax .ws .rs .ApplicationPath ;
You can’t perform that action at this time.
0 commit comments