Package io.servicetalk.concurrent.api
Class ConcurrentPublisherSubscriberFunction<T>
- java.lang.Object
-
- io.servicetalk.concurrent.api.ConcurrentPublisherSubscriberFunction<T>
-
- Type Parameters:
T
- Type of items received by theSubscriber
.
- All Implemented Interfaces:
java.util.function.Function<PublisherSource.Subscriber<? super T>,PublisherSource.Subscriber<? super T>>
public final class ConcurrentPublisherSubscriberFunction<T> extends java.lang.Object implements java.util.function.Function<PublisherSource.Subscriber<? super T>,PublisherSource.Subscriber<? super T>>
Allows multiplePublisherSource.Subscriber
s to be concurrently subscribed to aTestPublisher
, and multicasts signals to them all.
-
-
Constructor Summary
Constructors Constructor Description ConcurrentPublisherSubscriberFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PublisherSource.Subscriber<? super T>
apply(PublisherSource.Subscriber<? super T> subscriber)
java.util.List<PublisherSource.Subscriber<? super T>>
subscribers()
Returns a list of allPublisherSource.Subscriber
s that have subscribed.
-
-
-
Method Detail
-
apply
public PublisherSource.Subscriber<? super T> apply(PublisherSource.Subscriber<? super T> subscriber)
- Specified by:
apply
in interfacejava.util.function.Function<PublisherSource.Subscriber<? super T>,PublisherSource.Subscriber<? super T>>
-
subscribers
public java.util.List<PublisherSource.Subscriber<? super T>> subscribers()
Returns a list of allPublisherSource.Subscriber
s that have subscribed.- Returns:
- a list of all
PublisherSource.Subscriber
s that have subscribed.
-
-