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 aSingleinto aBlockingSingle.- Type Parameters:
T- the value type of the sequence- Parameters:
single- theSingleyou want to convert- Returns:
- a
BlockingSingleversion ofsingle
-
value
Returns the item emitted by thisBlockingSingle. If the underlyingSinglereturns successfully, the value emitted by theSingleis returned. If theSingleemits an error, the throwable emitted (SingleSubscriber.onError(Throwable)) is thrown.- Returns:
- the value emitted by this
BlockingSingle
-
toFuture
Returns aFuturerepresenting the value emitted by thisBlockingSingle.- Returns:
- a
Futurethat returns the value
-