public class VertxClientHttpEngine extends Object implements AsyncClientHttpEngine
AsyncClientHttpEngine.ResultExtractor<T>
Modifier and Type | Field and Description |
---|---|
static String |
REQUEST_TIMEOUT_MS
Client config property to set when a request timeout is needed.
|
Constructor and Description |
---|
VertxClientHttpEngine() |
VertxClientHttpEngine(io.vertx.core.http.HttpClient client) |
VertxClientHttpEngine(io.vertx.core.Vertx vertx) |
VertxClientHttpEngine(io.vertx.core.Vertx vertx,
io.vertx.core.http.HttpClientOptions options) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
HostnameVerifier |
getHostnameVerifier()
Needed for Client.getHostnameVerifier()
|
SSLContext |
getSslContext()
Needed for Client.getSslContext();
|
javax.ws.rs.core.Response |
invoke(javax.ws.rs.client.Invocation request) |
<T> CompletableFuture<T> |
submit(ClientInvocation request,
boolean buffered,
AsyncClientHttpEngine.ResultExtractor<T> extractor,
ExecutorService executorService)
Submits an asynchronous request.
|
<T> Future<T> |
submit(ClientInvocation request,
boolean buffered,
javax.ws.rs.client.InvocationCallback<T> callback,
AsyncClientHttpEngine.ResultExtractor<T> extractor)
Submits an asynchronous request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
submit
public static final String REQUEST_TIMEOUT_MS
public VertxClientHttpEngine()
public VertxClientHttpEngine(io.vertx.core.Vertx vertx, io.vertx.core.http.HttpClientOptions options)
public VertxClientHttpEngine(io.vertx.core.Vertx vertx)
public VertxClientHttpEngine(io.vertx.core.http.HttpClient client)
public <T> Future<T> submit(ClientInvocation request, boolean buffered, javax.ws.rs.client.InvocationCallback<T> callback, AsyncClientHttpEngine.ResultExtractor<T> extractor)
AsyncClientHttpEngine
submit
in interface AsyncClientHttpEngine
T
- typerequest
- Requestbuffered
- buffer the response?callback
- Optional callback receiving the result, which is run inside the io-thread. may be null.extractor
- ResultExtractor for extracting a result out of a ClientResponse. Is run inside the io-threadpublic <T> CompletableFuture<T> submit(ClientInvocation request, boolean buffered, AsyncClientHttpEngine.ResultExtractor<T> extractor, ExecutorService executorService)
AsyncClientHttpEngine
submit
in interface AsyncClientHttpEngine
T
- typerequest
- Requestbuffered
- buffer the response?extractor
- ResultExtractor for extracting a result out of a ClientResponse. Is run inside the io-threadexecutorService
- the executor to use for asynchronous executionCompletableFuture
with the result or Exceptionpublic SSLContext getSslContext()
ClientHttpEngine
getSslContext
in interface ClientHttpEngine
SSLContext
public HostnameVerifier getHostnameVerifier()
ClientHttpEngine
getHostnameVerifier
in interface ClientHttpEngine
HostnameVerifier
public javax.ws.rs.core.Response invoke(javax.ws.rs.client.Invocation request)
invoke
in interface ClientHttpEngine
public void close()
close
in interface ClientHttpEngine
Copyright © 2020 JBoss by Red Hat. All rights reserved.