Class TestEnvironment.TestSubscriber<T>
java.lang.Object
org.reactivestreams.tck.TestEnvironment.TestSubscriber<T>
- All Implemented Interfaces:
Subscriber<T>
- Direct Known Subclasses:
TestEnvironment.ManualSubscriber
- Enclosing class:
TestEnvironment
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TestEnvironment(package private) final TestEnvironment.Promise<Subscription> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidSuccessful terminal state.voidFailed terminal state.voidData notification sent by thePublisherin response to requests toSubscription.request(long).voidonSubscribe(Subscription subscription) Invoked after callingPublisher.subscribe(Subscriber).
-
Field Details
-
subscription
-
env
-
-
Constructor Details
-
TestSubscriber
-
-
Method Details
-
onError
Description copied from interface:SubscriberFailed terminal state.No further events will be sent even if
Subscription.request(long)is invoked again.- Specified by:
onErrorin interfaceSubscriber<T>- Parameters:
cause- the throwable signaled
-
onComplete
public void onComplete()Description copied from interface:SubscriberSuccessful terminal state.No further events will be sent even if
Subscription.request(long)is invoked again.- Specified by:
onCompletein interfaceSubscriber<T>
-
onNext
Description copied from interface:SubscriberData notification sent by thePublisherin response to requests toSubscription.request(long).- Specified by:
onNextin interfaceSubscriber<T>- Parameters:
element- the element signaled
-
onSubscribe
Description copied from interface:SubscriberInvoked after callingPublisher.subscribe(Subscriber).No data will start flowing until
Subscription.request(long)is invoked.It is the responsibility of this
Subscriberinstance to callSubscription.request(long)whenever more data is wanted.The
Publisherwill send notifications only in response toSubscription.request(long).- Specified by:
onSubscribein interfaceSubscriber<T>- Parameters:
subscription- theSubscriptionthat allows requesting data viaSubscription.request(long)
-
cancel
public void cancel()
-