public interface RxStreamingHttpClient extends StreamingHttpClient, RxHttpClient
StreamingHttpClient
that exposes an RxJava 2.x interface.DEFAULT_ERROR_TYPE
Modifier and Type | Method and Description |
---|---|
static RxStreamingHttpClient |
create(URL url)
Create a new
HttpClient . |
<I> io.reactivex.Flowable<ByteBuffer<?>> |
dataStream(HttpRequest<I> request)
Request a stream of data where each emitted item is a
ByteBuffer instance. |
<I> io.reactivex.Flowable<HttpResponse<ByteBuffer<?>>> |
exchangeStream(HttpRequest<I> request)
Requests a stream data where each emitted item is a
ByteBuffer wrapped in the HttpResponse object
(which remains the same for each emitted item). |
<I> io.reactivex.Flowable<Map<String,Object>> |
jsonStream(HttpRequest<I> request)
Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
|
<I,O> io.reactivex.Flowable<O> |
jsonStream(HttpRequest<I> request,
Argument<O> type)
Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
|
default <I,O> io.reactivex.Flowable<O> |
jsonStream(HttpRequest<I> request,
Class<O> type)
Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
|
exchange, exchange, exchange, exchange, exchange, exchange, retrieve, retrieve, retrieve, retrieve, retrieve
refresh, toBlocking
<I> io.reactivex.Flowable<ByteBuffer<?>> dataStream(HttpRequest<I> request)
StreamingHttpClient
ByteBuffer
instance.dataStream
in interface StreamingHttpClient
I
- The request body typerequest
- The requestPublisher
that emits a stream of ByteBuffer
instances<I> io.reactivex.Flowable<HttpResponse<ByteBuffer<?>>> exchangeStream(HttpRequest<I> request)
StreamingHttpClient
ByteBuffer
wrapped in the HttpResponse
object
(which remains the same for each emitted item).exchangeStream
in interface StreamingHttpClient
I
- The request body typerequest
- The HttpRequest
Publisher
that emits a stream of ByteBuffer
instances wrapped by a HttpResponse
<I> io.reactivex.Flowable<Map<String,Object>> jsonStream(HttpRequest<I> request)
StreamingHttpClient
Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
The downstream Subscriber
can regulate demand via the subscription
jsonStream
in interface StreamingHttpClient
I
- The request body typerequest
- The HttpRequest
to executePublisher
that emits the full HttpResponse
object<I,O> io.reactivex.Flowable<O> jsonStream(HttpRequest<I> request, Argument<O> type)
StreamingHttpClient
Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
The downstream Subscriber
can regulate demand via the subscription. Incoming data
is buffered.
jsonStream
in interface StreamingHttpClient
I
- The request body typeO
- The response typerequest
- The HttpRequest
to executetype
- The type of object to convert the JSON intoPublisher
that emits the full HttpResponse
objectdefault <I,O> io.reactivex.Flowable<O> jsonStream(HttpRequest<I> request, Class<O> type)
StreamingHttpClient
Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
The downstream Subscriber
can regulate demand via the subscription
jsonStream
in interface StreamingHttpClient
I
- The request body typeO
- The response typerequest
- The HttpRequest
to executetype
- The type of object to convert the JSON intoPublisher
that emits the full HttpResponse
objectstatic RxStreamingHttpClient create(URL url)
HttpClient
. Note that this method should only be used outside of the context of an application. Within Micronaut use
Inject
to inject a client insteadcreate
in interface HttpClient
create
in interface RxHttpClient
url
- The base URL