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 TypeMethodDescriptionvoidsubscribe(org.reactivestreams.Subscriber subscriber) RequestSseEventPublisherto start streaming data.Methods inherited from class org.glassfish.jersey.client.ChunkedInput
close, createMultiParser, createParser, createParser, getChunkType, getParser, isClosed, read, setChunkType, setChunkType, setParserMethods inherited from class jakarta.ws.rs.core.GenericType
equals, forInstance, getRawType, getType, hashCode, toString
-
Method Details
-
subscribe
public void subscribe(org.reactivestreams.Subscriber subscriber) RequestSseEventPublisherto start streaming data. EachSseEventSubscriptionwill work for only a singleSubscriber. If theSseEventPublisherrejects the subscription attempt or otherwise fails it will signal the error viaSubscriber.onError(Throwable).- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<InboundEvent>- Parameters:
subscriber- theSubscriberthat will consume signals from theSseEventPublisher
-