public abstract class AbstractAsyncRestClient extends Object implements AsyncRestClient, AsyncInvoker
AsyncRestClient implementation.AsyncRestClient.AsyncInvocation, AsyncRestClient.AsyncRequestDefinitionRestClientOperations.InvocationOperations<RE,RP,RS,RL,RU>, RestClientOperations.RequestConfiguration<R extends RestClientOperations.RequestConfiguration<R>>| Constructor and Description |
|---|
AbstractAsyncRestClient() |
| Modifier and Type | Method and Description |
|---|---|
AsyncRestClient |
clearDefaultHeaders()
Removes all default headers
|
AsyncRestClient |
defaultTarget(URI baseUri)
Set the default target request base URI, which will be used as target URI for every request configured using
RestClientOperations.request(), if not overridden using RestClientOperations.RequestConfiguration.target(URI). |
Optional<URI> |
getDefaultTarget()
Get the default target request base URI, which will be used as target URI for every request configured using
RestClientOperations.request(), if not overridden using RestClientOperations.RequestConfiguration.target(URI). |
AsyncRestClient |
removeDefaultHeader(String name)
Removes the default header with given
name, if present |
AsyncRestClient.AsyncRequestDefinition |
request()
Create a new request definition, to be used to configure request and invoke response.
|
AsyncRestClient |
withDefaultHeader(String name,
String value)
Add a default request header which will be automatically added to every invocation request message, if an header
with the same name is not already present.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, create, create, forTarget, forTargetinvokepublic AsyncRestClient defaultTarget(URI baseUri)
RestClientOperationsRestClientOperations.request(), if not overridden using RestClientOperations.RequestConfiguration.target(URI).
URI template parameters are not supported for the base target URI.
defaultTarget in interface RestClientOperations<AsyncRestClient,AsyncRestClient.AsyncRequestDefinition>baseUri - Default target request base URIpublic Optional<URI> getDefaultTarget()
RestClientOperationsRestClientOperations.request(), if not overridden using RestClientOperations.RequestConfiguration.target(URI).getDefaultTarget in interface RestClientOperations<AsyncRestClient,AsyncRestClient.AsyncRequestDefinition>public AsyncRestClient withDefaultHeader(String name, String value)
RestClientOperationswithDefaultHeader in interface RestClientOperations<AsyncRestClient,AsyncRestClient.AsyncRequestDefinition>name - Header name (not null)value - Header valuepublic AsyncRestClient removeDefaultHeader(String name)
RestClientOperationsname, if presentremoveDefaultHeader in interface RestClientOperations<AsyncRestClient,AsyncRestClient.AsyncRequestDefinition>name - Header name to remove (not null)public AsyncRestClient clearDefaultHeaders()
RestClientOperationsclearDefaultHeaders in interface RestClientOperations<AsyncRestClient,AsyncRestClient.AsyncRequestDefinition>public AsyncRestClient.AsyncRequestDefinition request()
RestClientOperations
If a default target request URI is configured using RestClientOperations.defaultTarget(URI), this will be used as request
base URI. The target URI can be overridden using RestClientOperations.RequestConfiguration.target(URI).
request in interface RestClientOperations<AsyncRestClient,AsyncRestClient.AsyncRequestDefinition>Copyright © 2019 The Holon Platform. All rights reserved.