@Experimental public class BlockingSingle<T> extends 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 |
from(Single
Converts a
Single into a
BlockingSingle.
|
Future |
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 convert
BlockingSingle 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 Future<T> toFuture()
Future representing the value emitted by this
BlockingSingle.
Future that returns the value