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
,TestSingle
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface SingleSource<T>
An asynchronous computation that either completes with success giving the result or completes with an error.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SingleSource.Processor<T,R>
ASingleSource.Processor
represents a processing stage that is both aSingleSource
and aSingleSource.Subscriber
and obeys the contracts of both.static interface
SingleSource.Subscriber<T>
Subscriber of the outcome of aSingleSource
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
subscribe(SingleSource.Subscriber<? super T> subscriber)
Subscribe for the result of thisSingleSource
.
-
-
-
Method Detail
-
subscribe
void subscribe(SingleSource.Subscriber<? super T> subscriber)
Subscribe for the result of thisSingleSource
.- Parameters:
subscriber
- to subscribe for the result.- See Also:
PublisherSource.subscribe(PublisherSource.Subscriber)
-
-