Package rx.singles
Class BlockingSingle<T>
java.lang.Object
rx.singles.BlockingSingle<T>
- Type Parameters:
T
- the value type of the sequence
BlockingSingle
is a blocking "version" of Single
that provides blocking
operators.
You construct a BlockingSingle
from a Single
with from(Single)
or Single.toBlocking()
.- Since:
- (if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
single
-
-
Constructor Details
-
BlockingSingle
-
-
Method Details
-
from
Converts aSingle
into aBlockingSingle
.- Type Parameters:
T
- the value type of the sequence- Parameters:
single
- theSingle
you want to convert- Returns:
- a
BlockingSingle
version ofsingle
-
value
Returns the item emitted by thisBlockingSingle
. If the underlyingSingle
returns successfully, the value emitted by theSingle
is returned. If theSingle
emits an error, the throwable emitted (SingleSubscriber.onError(Throwable)
) is thrown.- Returns:
- the value emitted by this
BlockingSingle
-
toFuture
Returns aFuture
representing the value emitted by thisBlockingSingle
.- Returns:
- a
Future
that returns the value
-