Class TestEnvironment.ManualSubscriber<T>
java.lang.Object
org.reactivestreams.tck.TestEnvironment.TestSubscriber<T>
org.reactivestreams.tck.TestEnvironment.ManualSubscriber<T>
- All Implemented Interfaces:
Subscriber<T>
- Direct Known Subclasses:
TestEnvironment.ManualSubscriberWithSubscriptionSupport
- Enclosing class:
TestEnvironment
Subscriber implementation which can be steered by test code and asserted on.-
Field Summary
FieldsFields inherited from class TestEnvironment.TestSubscriber
env, subscription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidexpectCompletion(long timeoutMillis) voidexpectCompletion(long timeoutMillis, String errorMsg) voidexpectCompletion(String errorMsg) <E extends Throwable>
EexpectError(Class<E> expected) <E extends Throwable>
EexpectError(Class<E> expected, long timeoutMillis) <E extends Throwable>
EexpectError(Class<E> expected, long totalTimeoutMillis, long pollTimeoutMillis) <E extends Throwable>
EexpectError(Class<E> expected, long totalTimeoutMillis, long pollTimeoutMillis, String errorMsg) <E extends Throwable>
EexpectError(Class<E> expected, long timeoutMillis, String errorMsg) <E extends Throwable>
EexpectError(Class<E> expected, String errorMsg) <E extends Throwable>
voidexpectErrorWithMessage(Class<E> expected, String requiredMessagePart) <E extends Throwable>
voidexpectErrorWithMessage(Class<E> expected, String requiredMessagePart, long timeoutMillis) <E extends Throwable>
voidexpectErrorWithMessage(Class<E> expected, List<String> requiredMessagePartAlternatives) <E extends Throwable>
voidexpectErrorWithMessage(Class<E> expected, List<String> requiredMessagePartAlternatives, long timeoutMillis) <E extends Throwable>
voidexpectErrorWithMessage(Class<E> expected, List<String> requiredMessagePartAlternatives, long totalTimeoutMillis, long pollTimeoutMillis) voidexpectNext(T expected) voidexpectNext(T expected, long timeoutMillis) voidvoidexpectNone(long withinMillis) voidexpectNone(long withinMillis, String errMsgPrefix) voidexpectNone(String errMsgPrefix) nextElement(long timeoutMillis) nextElement(long timeoutMillis, String errorMsg) nextElement(String errorMsg) nextElementOrEndOfStream(long timeoutMillis) nextElementOrEndOfStream(long timeoutMillis, String errorMsg) nextElements(long elements) nextElements(long elements, long timeoutMillis) nextElements(long elements, long timeoutMillis, String errorMsg) nextElements(long elements, String errorMsg) voidSuccessful terminal state.voidData notification sent by thePublisherin response to requests toSubscription.request(long).voidrequest(long elements) voidvoidrequestEndOfStream(long timeoutMillis) voidrequestEndOfStream(long timeoutMillis, String errorMsg) voidrequestEndOfStream(String errorMsg) requestNextElement(long timeoutMillis) requestNextElement(long timeoutMillis, String errorMsg) requestNextElement(String errorMsg) requestNextElementOrEndOfStream(long timeoutMillis) requestNextElementOrEndOfStream(long timeoutMillis, String errorMsg) requestNextElementOrEndOfStream(String errorMsg) requestNextElements(long elements) requestNextElements(long elements, long timeoutMillis) requestNextElements(long elements, long timeoutMillis, String errorMsg) Methods inherited from class TestEnvironment.TestSubscriber
cancel, onError, onSubscribe
-
Field Details
-
received
TestEnvironment.Receptacle<T> received
-
-
Constructor Details
-
ManualSubscriber
-
-
Method Details
-
onNext
Description copied from interface:SubscriberData notification sent by thePublisherin response to requests toSubscription.request(long).- Specified by:
onNextin interfaceSubscriber<T>- Overrides:
onNextin classTestEnvironment.TestSubscriber<T>- Parameters:
element- the element 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>- Overrides:
onCompletein classTestEnvironment.TestSubscriber<T>
-
request
public void request(long elements) -
requestNextElement
- Throws:
InterruptedException
-
requestNextElement
- Throws:
InterruptedException
-
requestNextElement
- Throws:
InterruptedException
-
requestNextElement
- Throws:
InterruptedException
-
requestNextElementOrEndOfStream
- Throws:
InterruptedException
-
requestNextElementOrEndOfStream
- Throws:
InterruptedException
-
requestNextElementOrEndOfStream
- Throws:
InterruptedException
-
requestNextElementOrEndOfStream
public Optional<T> requestNextElementOrEndOfStream(long timeoutMillis, String errorMsg) throws InterruptedException - Throws:
InterruptedException
-
requestEndOfStream
- Throws:
InterruptedException
-
requestEndOfStream
- Throws:
InterruptedException
-
requestEndOfStream
- Throws:
InterruptedException
-
requestEndOfStream
- Throws:
InterruptedException
-
requestNextElements
- Throws:
InterruptedException
-
requestNextElements
- Throws:
InterruptedException
-
requestNextElements
public List<T> requestNextElements(long elements, long timeoutMillis, String errorMsg) throws InterruptedException - Throws:
InterruptedException
-
nextElement
- Throws:
InterruptedException
-
nextElement
- Throws:
InterruptedException
-
nextElement
- Throws:
InterruptedException
-
nextElement
- Throws:
InterruptedException
-
nextElementOrEndOfStream
- Throws:
InterruptedException
-
nextElementOrEndOfStream
- Throws:
InterruptedException
-
nextElementOrEndOfStream
public Optional<T> nextElementOrEndOfStream(long timeoutMillis, String errorMsg) throws InterruptedException - Throws:
InterruptedException
-
nextElements
- Throws:
InterruptedException
-
nextElements
- Throws:
InterruptedException
-
nextElements
- Throws:
InterruptedException
-
nextElements
public List<T> nextElements(long elements, long timeoutMillis, String errorMsg) throws InterruptedException - Throws:
InterruptedException
-
expectNext
- Throws:
InterruptedException
-
expectNext
- Throws:
InterruptedException
-
expectCompletion
- Throws:
InterruptedException
-
expectCompletion
- Throws:
InterruptedException
-
expectCompletion
- Throws:
InterruptedException
-
expectCompletion
- Throws:
InterruptedException
-
expectErrorWithMessage
-
expectErrorWithMessage
-
expectErrorWithMessage
-
expectErrorWithMessage
-
expectErrorWithMessage
-
expectError
-
expectError
-
expectError
-
expectError
-
expectError
-
expectError
-
expectNone
- Throws:
InterruptedException
-
expectNone
- Throws:
InterruptedException
-
expectNone
- Throws:
InterruptedException
-
expectNone
- Throws:
InterruptedException
-