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 interfaceSingleSource.Processor<T,R>ASingleSource.Processorrepresents a processing stage that is both aSingleSourceand aSingleSource.Subscriberand obeys the contracts of both.static interfaceSingleSource.Subscriber<T>Subscriber of the outcome of aSingleSource.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsubscribe(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)
-
-