Package org.reactivestreams.tck
Class TestEnvironment.ManualPublisher<T>
- java.lang.Object
-
- org.reactivestreams.tck.TestEnvironment.ManualPublisher<T>
-
- All Implemented Interfaces:
org.reactivestreams.Publisher<T>
- Direct Known Subclasses:
IdentityProcessorVerification.TestSetup
,SubscriberBlackboxVerification.BlackboxTestStage
,SubscriberWhiteboxVerification.WhiteboxTestStage
- Enclosing class:
- TestEnvironment
public static class TestEnvironment.ManualPublisher<T> extends java.lang.Object implements org.reactivestreams.Publisher<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected TestEnvironment.Latch
cancelled
protected TestEnvironment
env
protected long
pendingDemand
protected TestEnvironment.Receptacle<java.lang.Long>
requests
protected TestEnvironment.Promise<org.reactivestreams.Subscriber<? super T>>
subscriber
-
Constructor Summary
Constructors Constructor Description ManualPublisher(TestEnvironment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
expectCancelling()
void
expectCancelling(long timeoutMillis)
void
expectExactRequest(long expected)
void
expectExactRequest(long expected, long timeoutMillis)
void
expectNoRequest()
void
expectNoRequest(long timeoutMillis)
long
expectRequest()
long
expectRequest(long timeoutMillis)
long
expectRequest(long timeoutMillis, java.lang.String errorMessageAddendum)
boolean
isCancelled()
void
sendCompletion()
void
sendError(java.lang.Throwable cause)
void
sendNext(T element)
void
subscribe(org.reactivestreams.Subscriber<? super T> s)
-
-
-
Field Detail
-
env
protected final TestEnvironment env
-
pendingDemand
protected long pendingDemand
-
subscriber
protected TestEnvironment.Promise<org.reactivestreams.Subscriber<? super T>> subscriber
-
requests
protected final TestEnvironment.Receptacle<java.lang.Long> requests
-
cancelled
protected final TestEnvironment.Latch cancelled
-
-
Constructor Detail
-
ManualPublisher
public ManualPublisher(TestEnvironment env)
-
-
Method Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super T> s)
- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<T>
-
sendCompletion
public void sendCompletion()
-
sendError
public void sendError(java.lang.Throwable cause)
-
expectRequest
public long expectRequest() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectRequest
public long expectRequest(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectRequest
public long expectRequest(long timeoutMillis, java.lang.String errorMessageAddendum) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectExactRequest
public void expectExactRequest(long expected) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectExactRequest
public void expectExactRequest(long expected, long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNoRequest
public void expectNoRequest() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNoRequest
public void expectNoRequest(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCancelling
public void expectCancelling() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCancelling
public void expectCancelling(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
isCancelled
public boolean isCancelled() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-