public class ClientParameters
extends java.lang.Object
Client.| Constructor and Description |
|---|
ClientParameters() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getPassword() |
RestTemplateConfigurator |
getRestTemplateConfigurator() |
java.net.URL |
getUrl() |
java.lang.String |
getUsername() |
ClientParameters |
password(java.lang.String password)
Set the password to use when authenticating.
|
ClientParameters |
restTemplateConfigurator(RestTemplateConfigurator restTemplateConfigurator)
|
ClientParameters |
url(java.lang.String url)
Set the URL to use.
|
ClientParameters |
url(java.net.URL url)
Set the URL to use.
|
ClientParameters |
username(java.lang.String username)
Set the username to use when authenticating.
|
public ClientParameters url(java.net.URL url)
It is not expected that the URL contains any user info.
Use url(String) user info must be extracted
from the URL and assigned to username and password.
url - the URLpublic ClientParameters url(java.lang.String url) throws java.net.MalformedURLException
The URL can contain user info. If so, they are automatically assigned to the username and password properties of this instance.
url - the URLjava.net.MalformedURLException - for a badly formed URL.public ClientParameters username(java.lang.String username)
username - the usernamepublic ClientParameters password(java.lang.String password)
password - the passwordpublic ClientParameters restTemplateConfigurator(RestTemplateConfigurator restTemplateConfigurator)
RestTemplateConfigurator to post-process the Client's RestTemplate.
The default is to use HttpComponentsRestTemplateConfigurator and so using
HttpComponentsClientHttpRequestFactory in the RestTemplate
to create requests.
restTemplateConfigurator - the configurator to useRestTemplateConfiguratorpublic java.net.URL getUrl()
public java.lang.String getUsername()
public java.lang.String getPassword()
public RestTemplateConfigurator getRestTemplateConfigurator()