Class SseEventSuscriber<T>
java.lang.Object
org.glassfish.jersey.microprofile.restclient.SseEventSuscriber<T>
- All Implemented Interfaces:
org.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>
public class SseEventSuscriber<T>
extends Object
implements org.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription.voidMethod invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription.voidMethod invoked with a Subscription's next item.voidonSubscribe(org.glassfish.jersey.internal.jsr166.Flow.Subscription flowsubscription) Method invoked prior to invoking any other Subscriber methods for the given Subscription.
-
Constructor Details
-
SseEventSuscriber
-
-
Method Details
-
onSubscribe
public void onSubscribe(org.glassfish.jersey.internal.jsr166.Flow.Subscription flowsubscription) Description copied from interface:org.glassfish.jersey.internal.jsr166.Flow.SubscriberMethod invoked prior to invoking any other Subscriber methods for the given Subscription. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription not to be established or to be cancelled.Typically, implementations of this method invoke
subscription.requestto enable receiving items.- Specified by:
onSubscribein interfaceorg.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>- Parameters:
flowsubscription- a new subscription
-
onNext
Description copied from interface:org.glassfish.jersey.internal.jsr166.Flow.SubscriberMethod invoked with a Subscription's next item. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription to be cancelled.- Specified by:
onNextin interfaceorg.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>- Parameters:
item- the item
-
onError
Description copied from interface:org.glassfish.jersey.internal.jsr166.Flow.SubscriberMethod invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. If this method itself throws an exception, resulting behavior is undefined.- Specified by:
onErrorin interfaceorg.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>- Parameters:
t- the exception
-
onComplete
public void onComplete()Description copied from interface:org.glassfish.jersey.internal.jsr166.Flow.SubscriberMethod invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription. If this method throws an exception, resulting behavior is undefined.- Specified by:
onCompletein interfaceorg.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>
-