Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 9c02efa

Browse files
authored
Update deprecated SSE annotation (#19)
1 parent e56fc91 commit 9c02efa

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

code/exercise_013_Listen_and_Notify/src/main/java/com/lunatech/training/quarkus/ListenNotifyResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import io.vertx.mutiny.pgclient.PgPool;
88
import io.vertx.mutiny.sqlclient.SqlConnection;
99
import io.vertx.pgclient.PgNotification;
10-
import org.jboss.resteasy.reactive.RestSseElementType;
10+
import org.jboss.resteasy.reactive.RestStreamElementType;
1111

1212
import jakarta.inject.Inject;
1313
import jakarta.ws.rs.*;
@@ -22,7 +22,7 @@ public class ListenNotifyResource {
2222
@Path("{channel}")
2323
@GET
2424
@Produces(MediaType.SERVER_SENT_EVENTS)
25-
@RestSseElementType(MediaType.APPLICATION_JSON)
25+
@RestStreamElementType(MediaType.APPLICATION_JSON)
2626
public Multi<JsonObject> listen(@PathParam("channel") String channel) {
2727
return client
2828
.getConnection()

code/exercise_014_Internal_Channels/src/main/java/com/lunatech/training/quarkus/ListenNotifyResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import io.vertx.mutiny.pgclient.PgPool;
88
import io.vertx.mutiny.sqlclient.SqlConnection;
99
import io.vertx.pgclient.PgNotification;
10-
import org.jboss.resteasy.reactive.RestSseElementType;
10+
import org.jboss.resteasy.reactive.RestStreamElementType;
1111

1212
import jakarta.inject.Inject;
1313
import jakarta.ws.rs.*;
@@ -22,7 +22,7 @@ public class ListenNotifyResource {
2222
@Path("{channel}")
2323
@GET
2424
@Produces(MediaType.SERVER_SENT_EVENTS)
25-
@RestSseElementType(MediaType.APPLICATION_JSON)
25+
@RestStreamElementType(MediaType.APPLICATION_JSON)
2626
public Multi<JsonObject> listen(@PathParam("channel") String channel) {
2727
return client
2828
.getConnection()

code/exercise_014_Internal_Channels/src/main/java/com/lunatech/training/quarkus/PriceUpdatesResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import io.smallrye.mutiny.Multi;
44
import org.eclipse.microprofile.reactive.messaging.Channel;
5-
import org.jboss.resteasy.reactive.RestSseElementType;
5+
import org.jboss.resteasy.reactive.RestStreamElementType;
66

77
import jakarta.ws.rs.GET;
88
import jakarta.ws.rs.Path;
@@ -17,7 +17,7 @@ public class PriceUpdatesResource {
1717

1818
@GET
1919
@Produces(MediaType.SERVER_SENT_EVENTS)
20-
@RestSseElementType(MediaType.APPLICATION_JSON)
20+
@RestStreamElementType(MediaType.APPLICATION_JSON)
2121
public Multi<PriceUpdate> prices() {
2222
return priceUpdates;
2323
}

code/exercise_015_Connecting_to_Kafka/src/main/java/com/lunatech/training/quarkus/ListenNotifyResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import io.vertx.mutiny.pgclient.PgPool;
88
import io.vertx.mutiny.sqlclient.SqlConnection;
99
import io.vertx.pgclient.PgNotification;
10-
import org.jboss.resteasy.reactive.RestSseElementType;
10+
import org.jboss.resteasy.reactive.RestStreamElementType;
1111

1212
import jakarta.inject.Inject;
1313
import jakarta.ws.rs.*;
@@ -22,7 +22,7 @@ public class ListenNotifyResource {
2222
@Path("{channel}")
2323
@GET
2424
@Produces(MediaType.SERVER_SENT_EVENTS)
25-
@RestSseElementType(MediaType.APPLICATION_JSON)
25+
@RestStreamElementType(MediaType.APPLICATION_JSON)
2626
public Multi<JsonObject> listen(@PathParam("channel") String channel) {
2727
return client
2828
.getConnection()

code/exercise_015_Connecting_to_Kafka/src/main/java/com/lunatech/training/quarkus/PriceUpdatesResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import io.smallrye.mutiny.Multi;
44
import org.eclipse.microprofile.reactive.messaging.Channel;
5-
import org.jboss.resteasy.reactive.RestSseElementType;
5+
import org.jboss.resteasy.reactive.RestStreamElementType;
66

77
import jakarta.ws.rs.GET;
88
import jakarta.ws.rs.Path;
@@ -17,7 +17,7 @@ public class PriceUpdatesResource {
1717

1818
@GET
1919
@Produces(MediaType.SERVER_SENT_EVENTS)
20-
@RestSseElementType(MediaType.APPLICATION_JSON)
20+
@RestStreamElementType(MediaType.APPLICATION_JSON)
2121
public Multi<PriceUpdate> prices() {
2222
return priceUpdates;
2323
}

code/exercise_016_Dead_Letter_Queue_and_Stream_filtering/src/main/java/com/lunatech/training/quarkus/ListenNotifyResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import io.vertx.mutiny.pgclient.PgPool;
88
import io.vertx.mutiny.sqlclient.SqlConnection;
99
import io.vertx.pgclient.PgNotification;
10-
import org.jboss.resteasy.reactive.RestSseElementType;
10+
import org.jboss.resteasy.reactive.RestStreamElementType;
1111

1212
import jakarta.inject.Inject;
1313
import jakarta.ws.rs.*;
@@ -22,7 +22,7 @@ public class ListenNotifyResource {
2222
@Path("{channel}")
2323
@GET
2424
@Produces(MediaType.SERVER_SENT_EVENTS)
25-
@RestSseElementType(MediaType.APPLICATION_JSON)
25+
@RestStreamElementType(MediaType.APPLICATION_JSON)
2626
public Multi<JsonObject> listen(@PathParam("channel") String channel) {
2727
return client
2828
.getConnection()

code/exercise_016_Dead_Letter_Queue_and_Stream_filtering/src/main/java/com/lunatech/training/quarkus/PriceUpdatesResource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import io.smallrye.mutiny.Multi;
44
import org.eclipse.microprofile.reactive.messaging.Channel;
5-
import org.jboss.resteasy.reactive.RestSseElementType;
5+
import org.jboss.resteasy.reactive.RestStreamElementType;
66

77
import jakarta.ws.rs.GET;
88
import jakarta.ws.rs.Path;
@@ -18,14 +18,14 @@ public class PriceUpdatesResource {
1818

1919
@GET
2020
@Produces(MediaType.SERVER_SENT_EVENTS)
21-
@RestSseElementType(MediaType.APPLICATION_JSON)
21+
@RestStreamElementType(MediaType.APPLICATION_JSON)
2222
public Multi<PriceUpdate> prices() {
2323
return priceUpdates;
2424
}
2525

2626
@GET
2727
@Produces(MediaType.SERVER_SENT_EVENTS)
28-
@RestSseElementType(MediaType.APPLICATION_JSON)
28+
@RestStreamElementType(MediaType.APPLICATION_JSON)
2929
@Path("{id}")
3030
public Multi<PriceUpdate> pricesForProduct(@PathParam("id") Long id) {
3131
return priceUpdates.filter(priceUpdate -> priceUpdate.productId.equals(id));

0 commit comments

Comments
 (0)