Package org.reactivestreams.tck
Class SubscriberWhiteboxVerification.BlackboxSubscriberProxy<T>
- java.lang.Object
-
- org.reactivestreams.tck.SubscriberWhiteboxVerification.BlackboxProbe<T>
-
- org.reactivestreams.tck.SubscriberWhiteboxVerification.BlackboxSubscriberProxy<T>
-
- All Implemented Interfaces:
Subscriber<T>
,SubscriberWhiteboxVerification.SubscriberProbe<T>
- Enclosing class:
- SubscriberWhiteboxVerification<T>
public static class SubscriberWhiteboxVerification.BlackboxSubscriberProxy<T> extends SubscriberWhiteboxVerification.BlackboxProbe<T> implements Subscriber<T>
This class is intented to be used asSubscriber
decorator and should be used inpub.subscriber(...)
calls, in order to allow intercepting calls on the underlyingSubscriber
. This delegation allows the proxy to implementSubscriberWhiteboxVerification.BlackboxProbe
assertions.
-
-
Field Summary
-
Fields inherited from class org.reactivestreams.tck.SubscriberWhiteboxVerification.BlackboxProbe
elements, env, error, subscriber
-
-
Constructor Summary
Constructors Constructor Description BlackboxSubscriberProxy(TestEnvironment env, Subscriber<T> subscriber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onComplete()
Successful terminal state.void
onError(java.lang.Throwable cause)
Failed terminal state.void
onNext(T t)
Data notification sent by thePublisher
in response to requests toSubscription.request(long)
.void
onSubscribe(Subscription s)
Invoked after callingPublisher.subscribe(Subscriber)
.-
Methods inherited from class org.reactivestreams.tck.SubscriberWhiteboxVerification.BlackboxProbe
expectCompletion, expectCompletion, expectCompletion, expectError, expectError, expectError, expectError, expectErrorWithMessage, expectNext, expectNext, expectNext, expectNone, expectNone, registerOnComplete, registerOnError, registerOnNext, sub
-
-
-
-
Constructor Detail
-
BlackboxSubscriberProxy
public BlackboxSubscriberProxy(TestEnvironment env, Subscriber<T> subscriber)
-
-
Method Detail
-
onSubscribe
public void onSubscribe(Subscription s)
Description copied from interface:Subscriber
Invoked after callingPublisher.subscribe(Subscriber)
.No data will start flowing until
Subscription.request(long)
is invoked.It is the responsibility of this
Subscriber
instance to callSubscription.request(long)
whenever more data is wanted.The
Publisher
will send notifications only in response toSubscription.request(long)
.- Specified by:
onSubscribe
in interfaceSubscriber<T>
- Parameters:
s
- theSubscription
that allows requesting data viaSubscription.request(long)
-
onNext
public void onNext(T t)
Description copied from interface:Subscriber
Data notification sent by thePublisher
in response to requests toSubscription.request(long)
.- Specified by:
onNext
in interfaceSubscriber<T>
- Parameters:
t
- the element signaled
-
onError
public void onError(java.lang.Throwable cause)
Description copied from interface:Subscriber
Failed terminal state.No further events will be sent even if
Subscription.request(long)
is invoked again.- Specified by:
onError
in interfaceSubscriber<T>
- Parameters:
cause
- the throwable signaled
-
onComplete
public void onComplete()
Description copied from interface:Subscriber
Successful terminal state.No further events will be sent even if
Subscription.request(long)
is invoked again.- Specified by:
onComplete
in interfaceSubscriber<T>
-
-