public interface OslcClientFactory
This interface is not intended to be implemented by clients.
Modifier and Type | Method and Description |
---|---|
OslcClientFactory |
attribute(String name,
Object value)
Assigns a default attribute to inject on every
Resource used by the OslcClient created with this factory. |
OslcClient |
create()
Instantiates an OslcClient.
|
OslcClientFactory |
header(String name,
String value)
Assigns a default header to inject on every request executed by the OslcClient created with this factory.
|
OslcClientFactory |
locale(Enumeration<Locale> locales)
Informs the factory of the preferred locales, in case error messages shall be generated.
|
OslcClientFactory |
locale(Locale... locales)
Informs the factory of the preferred locales, in case error messages shall be generated.
|
OslcClientFactory |
proxy(org.apache.http.HttpHost proxy)
Gives the factory the proxy to use for executing HTTP requests.
|
OslcClientFactory |
proxyCredentials(org.apache.http.auth.Credentials credentials)
Gives the factory the credentials to use for proxy.
|
OslcClient create()
OslcClientFactory attribute(String name, Object value)
Resource
used by the OslcClient created with this factory.name
- the attribute name.value
- the attribute value.OslcClientFactory header(String name, String value)
name
- the header name.value
- the header value (the header is ignored if the value is null
or empty)OslcClientFactory locale(Locale... locales)
locales
- the locales, in order of preferenceOslcClientFactory locale(Enumeration<Locale> locales)
locales
- the locales, in order of preferenceOslcClientFactory proxy(org.apache.http.HttpHost proxy)
proxyCredentials()
method if proxy requires authentication.
When a proxy is not explicitly set with this method,
the underlying client will use standard Java system properties (e.g. https.proxyHost
and https.proxyPort
), if present,
for configuring the proxy.
proxy
- the proxy to useproxyCredentials(Credentials)
OslcClientFactory proxyCredentials(org.apache.http.auth.Credentials credentials)
credentials
- the credentials to use for proxy.proxy(HttpHost)