T - the value type of the sequencepublic final class BlockingSingle<T>
extends java.lang.Object
BlockingSingle is a blocking "version" of Single that provides blocking
operators.
You construct a BlockingSingle from a Single with from(Single)
or Single.toBlocking().| Modifier and Type | Method and Description |
|---|---|
static <T> BlockingSingle<T> |
from(Single<? extends T> single)
Converts a
Single into a BlockingSingle. |
java.util.concurrent.Future<T> |
toFuture()
Returns a
Future representing the value emitted by this BlockingSingle. |
T |
value()
Returns the item emitted by this
BlockingSingle. |
public static <T> BlockingSingle<T> from(Single<? extends T> single)
Single into a BlockingSingle.T - the value type of the sequencesingle - the Single you want to convertBlockingSingle version of singlepublic T value()
BlockingSingle.
If the underlying Single returns successfully, the value emitted
by the Single is returned. If the Single emits an error,
the throwable emitted (SingleSubscriber.onError(Throwable)) is
thrown.BlockingSinglepublic java.util.concurrent.Future<T> toFuture()
Future representing the value emitted by this BlockingSingle.Future that returns the value