Package com.rabbitmq.http.client
Class ClientParameters
- java.lang.Object
-
- com.rabbitmq.http.client.ClientParameters
-
-
Constructor Summary
Constructors Constructor Description ClientParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPassword()
RestTemplateConfigurator
getRestTemplateConfigurator()
URL
getUrl()
String
getUsername()
ClientParameters
password(String password)
Set the password to use when authenticating.ClientParameters
restTemplateConfigurator(RestTemplateConfigurator restTemplateConfigurator)
ClientParameters
url(String url)
Set the URL to use.ClientParameters
url(URL url)
Set the URL to use.ClientParameters
username(String username)
Set the username to use when authenticating.
-
-
-
Method Detail
-
url
public ClientParameters url(URL url)
Set the URL to use.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.- Parameters:
url
- the URL- Returns:
- this client parameters instance
-
url
public ClientParameters url(String url) throws MalformedURLException
Set the URL to use.The URL can contain user info. If so, they are automatically assigned to the username and password properties of this instance.
- Parameters:
url
- the URL- Returns:
- this client parameters instance
- Throws:
MalformedURLException
- for a badly formed URL.
-
username
public ClientParameters username(String username)
Set the username to use when authenticating.- Parameters:
username
- the username- Returns:
- this client parameters instance
-
password
public ClientParameters password(String password)
Set the password to use when authenticating.- Parameters:
password
- the password- Returns:
- this client parameters instance
-
restTemplateConfigurator
public ClientParameters restTemplateConfigurator(RestTemplateConfigurator restTemplateConfigurator)
Set aRestTemplateConfigurator
to post-process theClient
'sRestTemplate
.The default is to use
HttpComponentsRestTemplateConfigurator
and so usingHttpComponentsClientHttpRequestFactory
in theRestTemplate
to create requests.- Parameters:
restTemplateConfigurator
- the configurator to use- Returns:
- this client parameters instance
- See Also:
RestTemplateConfigurator
-
getUrl
public URL getUrl()
-
getUsername
public String getUsername()
-
getPassword
public String getPassword()
-
getRestTemplateConfigurator
public RestTemplateConfigurator getRestTemplateConfigurator()
-
-