@Experimental public 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. |
@Experimental public static <T> BlockingSingle<T> from(Single<? extends T> single)
Single into a BlockingSingle.single - the Single you want to convertBlockingSingle version of single@Experimental public 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.BlockingSingle@Experimental public java.util.concurrent.Future<T> toFuture()
Future representing the value emitted by this BlockingSingle.Future that returns the value