Package org.apache.syncope.client.lib
Class SyncopeClientFactoryBean
java.lang.Object
org.apache.syncope.client.lib.SyncopeClientFactoryBean
Factory bean for creating instances of
SyncopeClient
.
Supports Spring-bean configuration and override via subclassing (see protected methods).-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBuilds client instance which will be passing the provided value in theHttpHeaders.AUTHORIZATION
request header.Builds client instance with the given credentials.create
(AuthenticationHandler handler) Builds client instance with the given authentication handler.createAnonymous
(String username, String password) Builds client instance with the given anonymous credentials.protected static RestClientExceptionMapper
protected static org.apache.cxf.transports.http.configuration.HTTPClientPolicy
protected static com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider
protected org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean
protected static com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider
protected static com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider
org.apache.cxf.transports.http.configuration.HTTPClientPolicy
com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean
com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider
com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider
boolean
setAddress
(String address) setContentType
(String contentType) setContentType
(SyncopeClientFactoryBean.ContentType contentType) setExceptionMapper
(RestClientExceptionMapper exceptionMapper) setHttpClientPolicy
(org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy) void
setJsonProvider
(com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider jsonProvider) setRestClientFactoryBean
(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean restClientFactoryBean) setTlsClientParameters
(TLSClientParameters tlsClientParameters) Sets the client TLS configuration.setUseCompression
(boolean useCompression) Sets the given service instance for transparent gzipContent-Encoding
handling.void
setXmlProvider
(com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider xmlProvider) void
setYamlProvider
(com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider yamlProvider)
-
Constructor Details
-
SyncopeClientFactoryBean
public SyncopeClientFactoryBean()
-
-
Method Details
-
defaultJsonProvider
protected static com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider defaultJsonProvider() -
defaultXmlProvider
protected static com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider defaultXmlProvider() -
defaultYamlProvider
protected static com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider defaultYamlProvider() -
defaultExceptionMapper
-
defaultHTTPClientPolicy
protected static org.apache.cxf.transports.http.configuration.HTTPClientPolicy defaultHTTPClientPolicy() -
defaultRestClientFactoryBean
protected org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean defaultRestClientFactoryBean() -
getJsonProvider
public com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider getJsonProvider() -
setJsonProvider
public void setJsonProvider(com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider jsonProvider) -
getXmlProvider
public com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider getXmlProvider() -
setXmlProvider
public void setXmlProvider(com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider xmlProvider) -
getYamlProvider
public com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider getYamlProvider() -
setYamlProvider
public void setYamlProvider(com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider yamlProvider) -
getExceptionMapper
-
setExceptionMapper
-
getAddress
-
setAddress
-
getContentType
-
setContentType
-
setContentType
-
getDomain
-
setDomain
-
setUseCompression
Sets the given service instance for transparent gzipContent-Encoding
handling.- Parameters:
useCompression
- whether transparent gzipContent-Encoding
handling is to be enabled- Returns:
- the current instance
-
isUseCompression
public boolean isUseCompression() -
setHttpClientPolicy
public SyncopeClientFactoryBean setHttpClientPolicy(org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy) -
getHttpClientPolicy
public org.apache.cxf.transports.http.configuration.HTTPClientPolicy getHttpClientPolicy() -
setTlsClientParameters
Sets the client TLS configuration.- Parameters:
tlsClientParameters
- client TLS configuration- Returns:
- the current instance
-
getTlsClientParameters
-
getRestClientFactoryBean
public org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean getRestClientFactoryBean() -
setRestClientFactoryBean
public SyncopeClientFactoryBean setRestClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean restClientFactoryBean) -
create
Builds client instance with the given credentials. Such credentials will be used only to obtain a valid JWT in theHttpHeaders.AUTHORIZATION
header;- Parameters:
username
- usernamepassword
- password- Returns:
- client instance with the given credentials
-
create
Builds client instance which will be passing the provided value in theHttpHeaders.AUTHORIZATION
request header.- Parameters:
jwt
- value received after login, in theRESTHeaders.TOKEN
response header- Returns:
- client instance which will be passing the provided value in the
HttpHeaders.AUTHORIZATION
request header
-
create
Builds client instance with the given authentication handler.- Parameters:
handler
- authentication handler- Returns:
- client instance with the given authentication handler
-
createAnonymous
Builds client instance with the given anonymous credentials.- Parameters:
username
- usernamepassword
- password- Returns:
- client instance with the given credentials
-