From b147bb17186e7cf77a5803697dfb2b6f2f538a2a Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Wed, 7 Jun 2023 06:55:45 +0200 Subject: [PATCH] refactor: replace RestSseElementType with RestStreamElementType https://github.com/quarkusio/quarkus/pull/20908 https://github.com/quarkusio/quarkus/issues/13663 --- .../marcnuri/yakc/quickstarts/dashboard/pod/PodResource.java | 4 ++-- .../yakc/quickstarts/dashboard/watch/WatchResource.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/marcnuri/yakc/quickstarts/dashboard/pod/PodResource.java b/src/main/java/com/marcnuri/yakc/quickstarts/dashboard/pod/PodResource.java index 1730ff6..9dbadd7 100644 --- a/src/main/java/com/marcnuri/yakc/quickstarts/dashboard/pod/PodResource.java +++ b/src/main/java/com/marcnuri/yakc/quickstarts/dashboard/pod/PodResource.java @@ -23,7 +23,7 @@ import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.converters.multi.MultiRxConverters; import io.vertx.core.http.HttpServerResponse; -import org.jboss.resteasy.reactive.RestSseElementType; +import org.jboss.resteasy.reactive.RestStreamElementType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -94,7 +94,7 @@ public Pod update(@PathParam("namespace") String namespace, @PathParam("name") S @GET @Produces(MediaType.SERVER_SENT_EVENTS) - @RestSseElementType(MediaType.APPLICATION_JSON) // TODO Replaced by RestStreamElementType in next Quarkus version bump + @RestStreamElementType(MediaType.APPLICATION_JSON) @Path("/{namespace}/{name}/logs/{container}") public void getLogs( @Context HttpServerResponse response, @Context Sse sse, @Context SseEventSink sseEventSink, diff --git a/src/main/java/com/marcnuri/yakc/quickstarts/dashboard/watch/WatchResource.java b/src/main/java/com/marcnuri/yakc/quickstarts/dashboard/watch/WatchResource.java index 6998fce..a773e85 100644 --- a/src/main/java/com/marcnuri/yakc/quickstarts/dashboard/watch/WatchResource.java +++ b/src/main/java/com/marcnuri/yakc/quickstarts/dashboard/watch/WatchResource.java @@ -21,7 +21,7 @@ import io.quarkus.runtime.ShutdownEvent; import io.quarkus.runtime.annotations.RegisterForReflection; import io.vertx.core.http.HttpServerResponse; -import org.jboss.resteasy.reactive.RestSseElementType; +import org.jboss.resteasy.reactive.RestStreamElementType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,7 +60,7 @@ void onShutdown(@Observes ShutdownEvent event) { @GET @Produces(MediaType.SERVER_SENT_EVENTS) - @RestSseElementType(MediaType.APPLICATION_JSON) // TODO Replaced by RestStreamElementType in next Quarkus version bump + @RestStreamElementType(MediaType.APPLICATION_JSON) public void get(@Context HttpServerResponse response, @Context Sse sse, @Context SseEventSink sseEventSink) { watchService.newWatch(response).runSubscriptionOn(subscribeExecutor).subscribe().with(we -> { try {