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 TypeMethodDescriptionvoid
cancel()
Request theSseEventPublisher
to stop sending data and clean up resources.void
request
(long n) No events will be sent by aSseEventPublisher
until demand is signaled viarequest(long)
method.
-
Method Details
-
request
public void request(long n) No events will be sent by aSseEventPublisher
until demand is signaled viarequest(long)
method.- Specified by:
request
in interfaceorg.reactivestreams.Subscription
- Parameters:
n
- the strictly positive number of elements to requests to theSseEventPublisher
-
cancel
public void cancel()Request theSseEventPublisher
to stop sending data and clean up resources. Data may still be sent to meet previously signaled demand after calling cancel.- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-