public class RestClient extends Object implements AutoCloseableAsync
RestServerEndpoint
.Constructor and Description |
---|
RestClient(RestClientConfiguration configuration,
Executor executor) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
closeAsync()
Trigger the closing of the resource and return the corresponding close future.
|
<M extends MessageHeaders<EmptyRequestBody,P,EmptyMessageParameters>,P extends ResponseBody> |
sendRequest(String targetAddress,
int targetPort,
M messageHeaders) |
<M extends MessageHeaders<R,P,U>,U extends MessageParameters,R extends RequestBody,P extends ResponseBody> |
sendRequest(String targetAddress,
int targetPort,
M messageHeaders,
U messageParameters,
R request) |
<M extends MessageHeaders<R,P,U>,U extends MessageParameters,R extends RequestBody,P extends ResponseBody> |
sendRequest(String targetAddress,
int targetPort,
M messageHeaders,
U messageParameters,
R request,
Collection<FileUpload> fileUploads) |
<M extends MessageHeaders<R,P,U>,U extends MessageParameters,R extends RequestBody,P extends ResponseBody> |
sendRequest(String targetAddress,
int targetPort,
M messageHeaders,
U messageParameters,
R request,
Collection<FileUpload> fileUploads,
RestAPIVersion apiVersion) |
void |
shutdown(Time timeout) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public RestClient(RestClientConfiguration configuration, Executor executor)
public CompletableFuture<Void> closeAsync()
AutoCloseableAsync
closeAsync
in interface AutoCloseableAsync
public void shutdown(Time timeout)
public <M extends MessageHeaders<EmptyRequestBody,P,EmptyMessageParameters>,P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders) throws IOException
IOException
public <M extends MessageHeaders<R,P,U>,U extends MessageParameters,R extends RequestBody,P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders, U messageParameters, R request) throws IOException
IOException
public <M extends MessageHeaders<R,P,U>,U extends MessageParameters,R extends RequestBody,P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders, U messageParameters, R request, Collection<FileUpload> fileUploads) throws IOException
IOException
public <M extends MessageHeaders<R,P,U>,U extends MessageParameters,R extends RequestBody,P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders, U messageParameters, R request, Collection<FileUpload> fileUploads, RestAPIVersion apiVersion) throws IOException
IOException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.