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>
ASingle
that is also aSingleSource
and hence can be subscribed.Typically, this will be used to implement a
Single
that does not require an additional allocation when converting to aSingleSource
viaSourceAdapters.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 void
subscribe(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, onErrorMap, onErrorMap, onErrorMap, onErrorResume, onErrorResume, onErrorResume, onErrorReturn, onErrorReturn, onErrorReturn, publishAndSubscribeOn, publishAndSubscribeOnOverride, publishOn, publishOnOverride, recoverWith, repeat, repeatWhen, retry, retryWhen, subscribe, subscribeInternal, subscribeOn, subscribeOnOverride, subscribeShareContext, succeeded, timeout, timeout, timeout, timeout, toCompletable, toCompletionStage, toFuture, toPublisher, whenCancel, whenFinally, whenFinally, whenFinally, whenOnError, whenOnSubscribe, whenOnSuccess, whenSubscriber, zip, zip, zip, zip, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipWith, zipWithDelayError
-
-
-
-
Method Detail
-
subscribe
public final void subscribe(SingleSource.Subscriber<? super T> subscriber)
Description copied from interface:SingleSource
Subscribe for the result of thisSingleSource
.- Specified by:
subscribe
in interfaceSingleSource<T>
- Parameters:
subscriber
- to subscribe for the result.- See Also:
PublisherSource.subscribe(PublisherSource.Subscriber)
-
-