public final class AsyncHttpSingle
extends java.lang.Object
Single instances.| Modifier and Type | Method and Description |
|---|---|
static rx.Single<Response> |
create(BoundRequestBuilder builder)
Emits the responses to HTTP requests obtained from
builder. |
static <T> rx.Single<T> |
create(BoundRequestBuilder builder,
rx.functions.Func0<? extends AsyncHandler<? extends T>> handlerSupplier)
Emits the results of
AsyncHandlers obtained from
handlerSupplier for HTTP requests obtained from builder. |
static rx.Single<Response> |
create(rx.functions.Func1<? super AsyncHandler<?>,? extends java.util.concurrent.Future<?>> requestTemplate)
Emits the responses to HTTP requests obtained by calling
requestTemplate. |
static <T> rx.Single<T> |
create(rx.functions.Func1<? super AsyncHandler<?>,? extends java.util.concurrent.Future<?>> requestTemplate,
rx.functions.Func0<? extends AsyncHandler<? extends T>> handlerSupplier)
Emits the results of
AsyncHandlers obtained from
handlerSupplier for HTTP requests obtained obtained by calling
requestTemplate. |
public static rx.Single<Response> create(BoundRequestBuilder builder)
builder.builder - used to build the HTTP request that is to be executedSingle that executes new requests on subscription
obtained from builder on subscription and that emits the
responsejava.lang.NullPointerException - if builder is nullpublic static rx.Single<Response> create(rx.functions.Func1<? super AsyncHandler<?>,? extends java.util.concurrent.Future<?>> requestTemplate)
requestTemplate.requestTemplate - called to start the HTTP request with an
AysncHandler that builds the HTTP response and
propagates results to the returned Single. The
Future that is returned by requestTemplate
will be used to cancel the request when the Single is
unsubscribed.Single that executes new requests on subscription by
calling requestTemplate and that emits the responsejava.lang.NullPointerException - if requestTemplate is nullpublic static <T> rx.Single<T> create(BoundRequestBuilder builder, rx.functions.Func0<? extends AsyncHandler<? extends T>> handlerSupplier)
AsyncHandlers obtained from
handlerSupplier for HTTP requests obtained from builder.builder - used to build the HTTP request that is to be executedhandlerSupplier - supplies the desired AsyncHandler
instances that are used to produce resultsSingle that executes new requests on subscription
obtained from builder and that emits the result of the
AsyncHandler obtained from handlerSupplierjava.lang.NullPointerException - if at least one of the parameters is
nullpublic static <T> rx.Single<T> create(rx.functions.Func1<? super AsyncHandler<?>,? extends java.util.concurrent.Future<?>> requestTemplate, rx.functions.Func0<? extends AsyncHandler<? extends T>> handlerSupplier)
AsyncHandlers obtained from
handlerSupplier for HTTP requests obtained obtained by calling
requestTemplate.requestTemplate - called to start the HTTP request with an
AysncHandler that builds the HTTP response and
propagates results to the returned Single. The
Future that is returned by requestTemplate
will be used to cancel the request when the Single is
unsubscribed.handlerSupplier - supplies the desired AsyncHandler
instances that are used to produce resultsSingle that executes new requests on subscription by
calling requestTemplate and that emits the results
produced by the AsyncHandlers supplied by
handlerSupplierjava.lang.NullPointerException - if at least one of the parameters is
nullCopyright © 2018. All Rights Reserved.