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>
Subscriber
implementation 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 void
expectCompletion()
void
expectCompletion(long timeoutMillis)
void
expectCompletion(long timeoutMillis, java.lang.String errorMsg)
void
expectCompletion(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)
void
expectNext(T expected)
void
expectNext(T expected, long timeoutMillis)
void
expectNone()
void
expectNone(long withinMillis)
void
expectNone(long withinMillis, java.lang.String errMsgPrefix)
void
expectNone(java.lang.String errMsgPrefix)
T
nextElement()
T
nextElement(long timeoutMillis)
T
nextElement(long timeoutMillis, java.lang.String errorMsg)
T
nextElement(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)
void
onComplete()
void
onNext(T element)
void
request(long elements)
void
requestEndOfStream()
void
requestEndOfStream(long timeoutMillis)
void
requestEndOfStream(long timeoutMillis, java.lang.String errorMsg)
void
requestEndOfStream(java.lang.String errorMsg)
T
requestNextElement()
T
requestNextElement(long timeoutMillis)
T
requestNextElement(long timeoutMillis, java.lang.String errorMsg)
T
requestNextElement(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:
onNext
in interfaceorg.reactivestreams.Subscriber<T>
- Overrides:
onNext
in classTestEnvironment.TestSubscriber<T>
-
onComplete
public void onComplete()
- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<T>
- Overrides:
onComplete
in 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
-
-