public class SseEventSuscriber<T> extends Object implements org.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>
Constructor and Description |
---|
SseEventSuscriber(org.reactivestreams.Subscriber<T> subscriber) |
Modifier and Type | Method and Description |
---|---|
void |
onComplete()
Method 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.
|
void |
onError(Throwable t)
Method invoked upon an unrecoverable error encountered by a
Publisher or Subscription, after which no other Subscriber
methods are invoked by the Subscription.
|
void |
onNext(T item)
Method invoked with a Subscription's next item.
|
void |
onSubscribe(org.glassfish.jersey.internal.jsr166.Flow.Subscription flowsubscription)
Method invoked prior to invoking any other Subscriber
methods for the given Subscription.
|
public SseEventSuscriber(org.reactivestreams.Subscriber<T> subscriber)
public void onSubscribe(org.glassfish.jersey.internal.jsr166.Flow.Subscription flowsubscription)
org.glassfish.jersey.internal.jsr166.Flow.Subscriber
Typically, implementations of this method invoke subscription.request
to enable receiving items.
onSubscribe
in interface org.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>
flowsubscription
- a new subscriptionpublic void onNext(T item)
org.glassfish.jersey.internal.jsr166.Flow.Subscriber
onNext
in interface org.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>
item
- the itempublic void onError(Throwable t)
org.glassfish.jersey.internal.jsr166.Flow.Subscriber
onError
in interface org.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>
t
- the exceptionpublic void onComplete()
org.glassfish.jersey.internal.jsr166.Flow.Subscriber
onComplete
in interface org.glassfish.jersey.internal.jsr166.Flow.Subscriber<T>
Copyright © 2007-2023, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.