Class SseEventPublisher
java.lang.Object
jakarta.ws.rs.core.GenericType<T>
org.glassfish.jersey.client.ChunkedInput<InboundEvent>
org.glassfish.jersey.media.sse.EventInput
org.glassfish.jersey.microprofile.restclient.SseEventPublisher
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.reactivestreams.Publisher<InboundEvent>
public class SseEventPublisher
extends EventInput
implements org.reactivestreams.Publisher<InboundEvent>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
subscribe
(org.reactivestreams.Subscriber subscriber) RequestSseEventPublisher
to start streaming data.Methods inherited from class org.glassfish.jersey.client.ChunkedInput
close, createMultiParser, createParser, createParser, getChunkType, getParser, isClosed, read, setChunkType, setChunkType, setParser
Methods inherited from class jakarta.ws.rs.core.GenericType
equals, forInstance, getRawType, getType, hashCode, toString
-
Method Details
-
subscribe
public void subscribe(org.reactivestreams.Subscriber subscriber) RequestSseEventPublisher
to start streaming data. EachSseEventSubscription
will work for only a singleSubscriber
. If theSseEventPublisher
rejects the subscription attempt or otherwise fails it will signal the error viaSubscriber.onError(Throwable)
.- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<InboundEvent>
- Parameters:
subscriber
- theSubscriber
that will consume signals from theSseEventPublisher
-