Package io.servicetalk.concurrent
Interface SingleSource<T>
- Type Parameters:
T
- Type of the result of thisSingleSource
.
- All Known Subinterfaces:
SingleSource.Processor<T,
R>
- All Known Implementing Classes:
SourceWrappers.SingleSource
,SubscribableSingle
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An asynchronous computation that either completes with success giving the result or completes with an error.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
ASingleSource.Processor
represents a processing stage that is both aSingleSource
and aSingleSource.Subscriber
and obeys the contracts of both.static interface
Subscriber of the outcome of aSingleSource
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
subscribe
(SingleSource.Subscriber<? super T> subscriber) Subscribe for the result of thisSingleSource
.
-
Method Details
-
subscribe
Subscribe for the result of thisSingleSource
.- Parameters:
subscriber
- to subscribe for the result.- See Also:
-