https://github.com/lreimer/packtpub-building-javaee8-webservices-section.5
Building Webservices with Java EE 8 - Packt Publishing Video Course Section 5
https://github.com/lreimer/packtpub-building-javaee8-webservices-section.5
javaee8 microservice packt packtpub payara payara-micro webservice
Last synced: 10 months ago
JSON representation
Building Webservices with Java EE 8 - Packt Publishing Video Course Section 5
- Host: GitHub
- URL: https://github.com/lreimer/packtpub-building-javaee8-webservices-section.5
- Owner: lreimer
- License: mit
- Created: 2018-03-29T19:53:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T21:32:30.000Z (over 7 years ago)
- Last Synced: 2025-03-05T15:02:18.005Z (10 months ago)
- Topics: javaee8, microservice, packt, packtpub, payara, payara-micro, webservice
- Language: Java
- Homepage: https://www.packtpub.com/application-development/building-web-services-java-ee-8-video
- Size: 57.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Building Web Services with Java EE 8
Section 3: Using Server-sent Events (SSE)
## Videos
### Video 5.1: What are Server-Sent Events?
In this video we are talking about the benefits and possible usage scenarios of Server-sent events.
### Video 5.2: Implementing SSE on the server-side
In this video we are implementing simple asynchronous web services.
| Method | URI | Media Type | Description |
|---------|-----|--------|-------------|
| GET | /api/events | text/event-stream | Get and open the SSE stream to receive push events |
| POST | /api/events | */* | Post any message to be pushed to an open SSE stream |
| DELETE | /api/events | */* | Close any open SSE event stream |
### Video 5.3: Implementing SSE REST clients
In this video we are showing how to implement a JAX-RS REST client sending and receiving SSE.
### Video 5.4: Implementing and sending SSE broadcasts
In this video is showing how to subscribe and broadcast SSE events to all registered clients.
| Method | URI | Media Type | Description |
|--------|-----|--------|-------------|
| GET | /api/broadcast | text/event-stream | Get and open the SSE stream of broadcasted messages |
| POST | /api/broadcast | application/x-www-form-urlencoded | Send a broadcast message |
## Building and Running
```bash
$ mvn clean verify
$ docker build -t sse-service:1.0 .
$ docker run -it -p 8080:8080 sse-service:1.0
```