public final class ServiceDiscovererTestSubscriber<T> extends java.lang.Object implements PublisherSource.Subscriber<ServiceDiscovererEvent<T>>
Constructor and Description |
---|
ServiceDiscovererTestSubscriber(java.util.concurrent.CountDownLatch latch,
java.util.concurrent.atomic.AtomicReference<java.lang.Throwable> throwableRef,
long initialRequestN) |
Modifier and Type | Method and Description |
---|---|
int |
activeCount() |
int |
inactiveCount() |
void |
onComplete()
Callback to signal completion of the
PublisherSource for this Subscriber . |
void |
onError(java.lang.Throwable t)
Callback to receive an
error for this Subscriber . |
void |
onNext(ServiceDiscovererEvent<T> event)
Callback to receive a
data element for this Subscriber . |
void |
onSubscribe(PublisherSource.Subscription s)
Callback to receive a
PublisherSource.Subscription for this Subscriber . |
public ServiceDiscovererTestSubscriber(java.util.concurrent.CountDownLatch latch, java.util.concurrent.atomic.AtomicReference<java.lang.Throwable> throwableRef, long initialRequestN)
public void onSubscribe(PublisherSource.Subscription s)
PublisherSource.Subscriber
PublisherSource.Subscription
for this Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
onSubscribe
in interface PublisherSource.Subscriber<ServiceDiscovererEvent<T>>
s
- PublisherSource.Subscription
for this Subscriber
.public void onNext(@Nonnull ServiceDiscovererEvent<T> event)
PublisherSource.Subscriber
data
element for this Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
onNext
in interface PublisherSource.Subscriber<ServiceDiscovererEvent<T>>
event
- A data
element.public int activeCount()
public int inactiveCount()
public void onError(java.lang.Throwable t)
PublisherSource.Subscriber
error
for this Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
onError
in interface PublisherSource.Subscriber<ServiceDiscovererEvent<T>>
t
- error
for this Subscriber
.public void onComplete()
PublisherSource.Subscriber
PublisherSource
for this Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
onComplete
in interface PublisherSource.Subscriber<ServiceDiscovererEvent<T>>