Package org.reactivestreams.tck
Class TestEnvironment.ManualSubscriber<T>
- java.lang.Object
-
- org.reactivestreams.tck.TestEnvironment.TestSubscriber<T>
-
- org.reactivestreams.tck.TestEnvironment.ManualSubscriber<T>
-
- All Implemented Interfaces:
org.reactivestreams.Subscriber<T>
- Direct Known Subclasses:
TestEnvironment.ManualSubscriberWithSubscriptionSupport
- Enclosing class:
- TestEnvironment
public static class TestEnvironment.ManualSubscriber<T> extends TestEnvironment.TestSubscriber<T>
Subscriberimplementation which can be steered by test code and asserted on.
-
-
Field Summary
-
Fields inherited from class org.reactivestreams.tck.TestEnvironment.TestSubscriber
env
-
-
Constructor Summary
Constructors Constructor Description ManualSubscriber(TestEnvironment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexpectCompletion()voidexpectCompletion(long timeoutMillis)voidexpectCompletion(long timeoutMillis, java.lang.String errorMsg)voidexpectCompletion(java.lang.String errorMsg)<E extends java.lang.Throwable>
EexpectError(java.lang.Class<E> expected)<E extends java.lang.Throwable>
EexpectError(java.lang.Class<E> expected, long timeoutMillis)<E extends java.lang.Throwable>
EexpectError(java.lang.Class<E> expected, long totalTimeoutMillis, long pollTimeoutMillis)<E extends java.lang.Throwable>
EexpectError(java.lang.Class<E> expected, long totalTimeoutMillis, long pollTimeoutMillis, java.lang.String errorMsg)<E extends java.lang.Throwable>
EexpectError(java.lang.Class<E> expected, long timeoutMillis, java.lang.String errorMsg)<E extends java.lang.Throwable>
EexpectError(java.lang.Class<E> expected, java.lang.String errorMsg)<E extends java.lang.Throwable>
voidexpectErrorWithMessage(java.lang.Class<E> expected, java.lang.String requiredMessagePart)<E extends java.lang.Throwable>
voidexpectErrorWithMessage(java.lang.Class<E> expected, java.lang.String requiredMessagePart, long timeoutMillis)<E extends java.lang.Throwable>
voidexpectErrorWithMessage(java.lang.Class<E> expected, java.util.List<java.lang.String> requiredMessagePartAlternatives)<E extends java.lang.Throwable>
voidexpectErrorWithMessage(java.lang.Class<E> expected, java.util.List<java.lang.String> requiredMessagePartAlternatives, long timeoutMillis)<E extends java.lang.Throwable>
voidexpectErrorWithMessage(java.lang.Class<E> expected, java.util.List<java.lang.String> requiredMessagePartAlternatives, long totalTimeoutMillis, long pollTimeoutMillis)voidexpectNext(T expected)voidexpectNext(T expected, long timeoutMillis)voidexpectNone()voidexpectNone(long withinMillis)voidexpectNone(long withinMillis, java.lang.String errMsgPrefix)voidexpectNone(java.lang.String errMsgPrefix)TnextElement()TnextElement(long timeoutMillis)TnextElement(long timeoutMillis, java.lang.String errorMsg)TnextElement(java.lang.String errorMsg)Optional<T>nextElementOrEndOfStream()Optional<T>nextElementOrEndOfStream(long timeoutMillis)Optional<T>nextElementOrEndOfStream(long timeoutMillis, java.lang.String errorMsg)java.util.List<T>nextElements(long elements)java.util.List<T>nextElements(long elements, long timeoutMillis)java.util.List<T>nextElements(long elements, long timeoutMillis, java.lang.String errorMsg)java.util.List<T>nextElements(long elements, java.lang.String errorMsg)voidonComplete()voidonNext(T element)voidrequest(long elements)voidrequestEndOfStream()voidrequestEndOfStream(long timeoutMillis)voidrequestEndOfStream(long timeoutMillis, java.lang.String errorMsg)voidrequestEndOfStream(java.lang.String errorMsg)TrequestNextElement()TrequestNextElement(long timeoutMillis)TrequestNextElement(long timeoutMillis, java.lang.String errorMsg)TrequestNextElement(java.lang.String errorMsg)Optional<T>requestNextElementOrEndOfStream()Optional<T>requestNextElementOrEndOfStream(long timeoutMillis)Optional<T>requestNextElementOrEndOfStream(long timeoutMillis, java.lang.String errorMsg)Optional<T>requestNextElementOrEndOfStream(java.lang.String errorMsg)java.util.List<T>requestNextElements(long elements)java.util.List<T>requestNextElements(long elements, long timeoutMillis)java.util.List<T>requestNextElements(long elements, long timeoutMillis, java.lang.String errorMsg)-
Methods inherited from class org.reactivestreams.tck.TestEnvironment.TestSubscriber
cancel, onError, onSubscribe
-
-
-
-
Constructor Detail
-
ManualSubscriber
public ManualSubscriber(TestEnvironment env)
-
-
Method Detail
-
onNext
public void onNext(T element)
- Specified by:
onNextin interfaceorg.reactivestreams.Subscriber<T>- Overrides:
onNextin classTestEnvironment.TestSubscriber<T>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<T>- Overrides:
onCompletein classTestEnvironment.TestSubscriber<T>
-
request
public void request(long elements)
-
requestNextElement
public T requestNextElement() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElement
public T requestNextElement(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElement
public T requestNextElement(java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElement
public T requestNextElement(long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElementOrEndOfStream
public Optional<T> requestNextElementOrEndOfStream() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElementOrEndOfStream
public Optional<T> requestNextElementOrEndOfStream(java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElementOrEndOfStream
public Optional<T> requestNextElementOrEndOfStream(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElementOrEndOfStream
public Optional<T> requestNextElementOrEndOfStream(long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestEndOfStream
public void requestEndOfStream() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestEndOfStream
public void requestEndOfStream(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestEndOfStream
public void requestEndOfStream(java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestEndOfStream
public void requestEndOfStream(long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElements
public java.util.List<T> requestNextElements(long elements) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElements
public java.util.List<T> requestNextElements(long elements, long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
requestNextElements
public java.util.List<T> requestNextElements(long elements, long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElement
public T nextElement() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElement
public T nextElement(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElement
public T nextElement(java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElement
public T nextElement(long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElementOrEndOfStream
public Optional<T> nextElementOrEndOfStream() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElementOrEndOfStream
public Optional<T> nextElementOrEndOfStream(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElementOrEndOfStream
public Optional<T> nextElementOrEndOfStream(long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElements
public java.util.List<T> nextElements(long elements) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElements
public java.util.List<T> nextElements(long elements, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElements
public java.util.List<T> nextElements(long elements, long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
nextElements
public java.util.List<T> nextElements(long elements, long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNext
public void expectNext(T expected) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNext
public void expectNext(T expected, long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCompletion
public void expectCompletion() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCompletion
public void expectCompletion(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCompletion
public void expectCompletion(java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCompletion
public void expectCompletion(long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectErrorWithMessage
public <E extends java.lang.Throwable> void expectErrorWithMessage(java.lang.Class<E> expected, java.lang.String requiredMessagePart) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectErrorWithMessage
public <E extends java.lang.Throwable> void expectErrorWithMessage(java.lang.Class<E> expected, java.util.List<java.lang.String> requiredMessagePartAlternatives) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectErrorWithMessage
public <E extends java.lang.Throwable> void expectErrorWithMessage(java.lang.Class<E> expected, java.lang.String requiredMessagePart, long timeoutMillis) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectErrorWithMessage
public <E extends java.lang.Throwable> void expectErrorWithMessage(java.lang.Class<E> expected, java.util.List<java.lang.String> requiredMessagePartAlternatives, long timeoutMillis) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectErrorWithMessage
public <E extends java.lang.Throwable> void expectErrorWithMessage(java.lang.Class<E> expected, java.util.List<java.lang.String> requiredMessagePartAlternatives, long totalTimeoutMillis, long pollTimeoutMillis) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectError
public <E extends java.lang.Throwable> E expectError(java.lang.Class<E> expected) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectError
public <E extends java.lang.Throwable> E expectError(java.lang.Class<E> expected, long timeoutMillis) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectError
public <E extends java.lang.Throwable> E expectError(java.lang.Class<E> expected, java.lang.String errorMsg) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectError
public <E extends java.lang.Throwable> E expectError(java.lang.Class<E> expected, long timeoutMillis, java.lang.String errorMsg) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectError
public <E extends java.lang.Throwable> E expectError(java.lang.Class<E> expected, long totalTimeoutMillis, long pollTimeoutMillis) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectError
public <E extends java.lang.Throwable> E expectError(java.lang.Class<E> expected, long totalTimeoutMillis, long pollTimeoutMillis, java.lang.String errorMsg) throws java.lang.Exception
- Throws:
java.lang.Exception
-
expectNone
public void expectNone() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNone
public void expectNone(java.lang.String errMsgPrefix) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNone
public void expectNone(long withinMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNone
public void expectNone(long withinMillis, java.lang.String errMsgPrefix) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-