Class SubscribableSingle<T>
- java.lang.Object
-
- io.servicetalk.concurrent.api.Single<T>
-
- io.servicetalk.concurrent.api.internal.SubscribableSingle<T>
-
- Type Parameters:
T- Type of result of thisSubscribableSingle.
- All Implemented Interfaces:
SingleSource<T>
- Direct Known Subclasses:
SourceWrappers.SingleSource
public abstract class SubscribableSingle<T> extends Single<T> implements SingleSource<T>
ASinglethat is also aSingleSourceand hence can be subscribed.Typically, this will be used to implement a
Singlethat does not require an additional allocation when converting to aSingleSourceviaSourceAdapters.toSource(Single).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.servicetalk.concurrent.SingleSource
SingleSource.Processor<T,R>, SingleSource.Subscriber<T>
-
-
Constructor Summary
Constructors Constructor Description SubscribableSingle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsubscribe(SingleSource.Subscriber<? super T> subscriber)Subscribe for the result of thisSingleSource.-
Methods inherited from class io.servicetalk.concurrent.api.Single
afterCancel, afterFinally, afterFinally, afterFinally, afterOnError, afterOnSubscribe, afterOnSuccess, afterSubscriber, amb, amb, ambWith, anyOf, anyOf, beforeCancel, beforeFinally, beforeFinally, beforeFinally, beforeOnError, beforeOnSubscribe, beforeOnSuccess, beforeSubscriber, collectUnordered, collectUnordered, collectUnordered, collectUnordered, collectUnorderedDelayError, collectUnorderedDelayError, collectUnorderedDelayError, collectUnorderedDelayError, concat, concat, concat, defer, failed, flatMap, flatMapCompletable, flatMapPublisher, fromCallable, fromFuture, fromStage, fromSupplier, handleSubscribe, idleTimeout, idleTimeout, idleTimeout, idleTimeout, ignoreElement, liftAsync, liftSync, map, never, publishAndSubscribeOn, publishAndSubscribeOnOverride, publishOn, publishOnOverride, recoverWith, repeat, repeatWhen, retry, retryWhen, subscribe, subscribeInternal, subscribeOn, subscribeOnOverride, subscribeShareContext, succeeded, toCompletable, toCompletionStage, toFuture, toPublisher, whenCancel, whenFinally, whenFinally, whenFinally, whenOnError, whenOnSubscribe, whenOnSuccess, whenSubscriber
-
-
-
-
Method Detail
-
subscribe
public final void subscribe(SingleSource.Subscriber<? super T> subscriber)
Description copied from interface:SingleSourceSubscribe for the result of thisSingleSource.- Specified by:
subscribein interfaceSingleSource<T>- Parameters:
subscriber- to subscribe for the result.- See Also:
PublisherSource.subscribe(PublisherSource.Subscriber)
-
-