diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InboundSseEventImpl.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InboundSseEventImpl.java index 66cecfadab348..e4357da6b0edf 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InboundSseEventImpl.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InboundSseEventImpl.java @@ -9,6 +9,7 @@ import jakarta.ws.rs.core.GenericType; import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.ext.ReaderInterceptor; import jakarta.ws.rs.sse.InboundSseEvent; import jakarta.ws.rs.sse.SseEvent; @@ -24,12 +25,18 @@ public class InboundSseEventImpl implements InboundSseEvent { private String data; private MediaType mediaType; private long reconnectDelay = SseEvent.RECONNECT_NOT_SET; - private Serialisers serialisers; - private ConfigurationImpl configuration; + private final Serialisers serialisers; + private final ConfigurationImpl configuration; + private final ReaderInterceptor[] interceptors; public InboundSseEventImpl(ConfigurationImpl configuration, Serialisers serialisers) { this.configuration = configuration; this.serialisers = serialisers; + var interceptors = Serialisers.NO_READER_INTERCEPTOR; + if ((configuration != null) && configuration.getReaderInterceptors() != null) { + interceptors = configuration.getReaderInterceptors().toArray(Serialisers.NO_READER_INTERCEPTOR); + } + this.interceptors = interceptors; } public MediaType getMediaType() { @@ -122,7 +129,7 @@ public T readData(GenericType type, MediaType mediaType) { try { return (T) ClientSerialisers.invokeClientReader(null, type.getRawType(), type.getType(), mediaType, null, null, new QuarkusMultivaluedHashMap<>(), - serialisers, in, Serialisers.NO_READER_INTERCEPTOR, configuration); + serialisers, in, interceptors, configuration); } catch (IOException e) { throw new UncheckedIOException(e); }