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.Latchcancelledprotected TestEnvironmentenvprotected longpendingDemandprotected TestEnvironment.Receptacle<java.lang.Long>requestsprotected 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 voidexpectCancelling()voidexpectCancelling(long timeoutMillis)voidexpectExactRequest(long expected)voidexpectExactRequest(long expected, long timeoutMillis)voidexpectNoRequest()voidexpectNoRequest(long timeoutMillis)longexpectRequest()longexpectRequest(long timeoutMillis)longexpectRequest(long timeoutMillis, java.lang.String errorMessageAddendum)booleanisCancelled()voidsendCompletion()voidsendError(java.lang.Throwable cause)voidsendNext(T element)voidsubscribe(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:
 subscribein 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
 
 - 
 
 -