Class SseEventSubscription<T>
java.lang.Object
org.glassfish.jersey.microprofile.restclient.SseEventSubscription<T>
- Type Parameters:
T- the type of event
- All Implemented Interfaces:
org.reactivestreams.Subscription
A
SseEventSubscription represents a one-to-one life-cycle of a
Subscriber subscribing to a SseEventPublisher.-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Request theSseEventPublisherto stop sending data and clean up resources.voidrequest(long n) No events will be sent by aSseEventPublisheruntil demand is signaled viarequest(long)method.
-
Method Details
-
request
public void request(long n) No events will be sent by aSseEventPublisheruntil demand is signaled viarequest(long)method.- Specified by:
requestin interfaceorg.reactivestreams.Subscription- Parameters:
n- the strictly positive number of elements to requests to theSseEventPublisher
-
cancel
public void cancel()Request theSseEventPublisherto stop sending data and clean up resources. Data may still be sent to meet previously signaled demand after calling cancel.- Specified by:
cancelin interfaceorg.reactivestreams.Subscription
-