Package org.codice.ddf.cxf.client
Interface ClientBuilder<T>
public interface ClientBuilder<T>
Builder class for creating secure CXF client factory objects that can generate WebClients
This code is experimental. While this interface is functional and tested, it may change or be * removed in a future version of the library.
-
Method Summary
Modifier and TypeMethodDescriptionadditionalOauthParameters(Map<String, String> additionalParameters) Additional OAuth parameters to use.allowRedirects(boolean allowRedirects) Whether or not to allow the client to follow redirects.build()Client ID for OAuth.clientKeyInfo(String certAlias, Path keystorePath) Key info to use when setting up TLS connection.clientSecret(String clientSecret) Client secret for OAuth.connectionTimeout(Integer connectionTimeout) Time before the connection will fail with no reply.disableCnCheck(boolean disableCnCheck) Turns the CN check off when performing a TLS/SSL connection.Discovery URL for OAuth.The endpoint the client should connect to.entityProviders(List<? extends Object> entityProviders) interceptor(org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message> interceptor) interfaceClass(Class<T> interfaceClass) The JAX-RS interface class/type that represents the endpointOAuth flow to use.Password to use with BASIC authenticationpropertyResolver(org.codice.ddf.configuration.PropertyResolver propertyResolver) Property resolver to use to replace any properties in the endpoint URLreceiveTimeout(Integer receiveTimeout) Time before connection will fail with no response.Source ID for OAuth.sslProtocol(String sslProtocol) SSL/TLS protocol to use.useOAuth(boolean useOAuth) True will enable the use of OAuth for this client.Username to use with BASIC authentication.useSamlEcp(boolean useSamlEcp) True will enable the use of SAML ECP for this client.Enables the use of the SubjectRetrievalInterceptor for this client.
-
Method Details
-
build
SecureCxfClientFactory<T> build() -
endpoint
The endpoint the client should connect to.- Parameters:
endpointUrl-- Returns:
-
interfaceClass
The JAX-RS interface class/type that represents the endpoint- Parameters:
interfaceClass-- Returns:
-
entityProviders
-
interceptor
ClientBuilder<T> interceptor(org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message> interceptor) -
disableCnCheck
Turns the CN check off when performing a TLS/SSL connection. This is for test only.- Parameters:
disableCnCheck-- Returns:
-
allowRedirects
Whether or not to allow the client to follow redirects.- Parameters:
allowRedirects-- Returns:
-
connectionTimeout
Time before the connection will fail with no reply.- Parameters:
connectionTimeout-- Returns:
-
receiveTimeout
Time before connection will fail with no response.- Parameters:
receiveTimeout-- Returns:
-
username
Username to use with BASIC authentication.- Parameters:
username-- Returns:
-
password
Password to use with BASIC authentication- Parameters:
password-- Returns:
-
clientKeyInfo
Key info to use when setting up TLS connection. In general this shouldn't need to be configured as the system will use whatever is set to use via the standard system properties.- Parameters:
certAlias-keystorePath-- Returns:
-
sslProtocol
SSL/TLS protocol to use. This shouldn't need to be used in most instances.- Parameters:
sslProtocol-- Returns:
-
sourceId
Source ID for OAuth.- Parameters:
sourceId-- Returns:
-
discovery
Discovery URL for OAuth.- Parameters:
discoveryUrl-- Returns:
-
clientId
Client ID for OAuth.- Parameters:
clientId-- Returns:
-
clientSecret
Client secret for OAuth.- Parameters:
clientSecret-- Returns:
-
oauthFlow
OAuth flow to use.- Parameters:
oauthFlow-- Returns:
-
additionalOauthParameters
Additional OAuth parameters to use.- Parameters:
additionalParameters-- Returns:
-
propertyResolver
Property resolver to use to replace any properties in the endpoint URL- Parameters:
propertyResolver-- Returns:
-
useOAuth
True will enable the use of OAuth for this client.- Parameters:
useOAuth-- Returns:
-
useSamlEcp
True will enable the use of SAML ECP for this client.- Parameters:
useSamlEcp-- Returns:
-
useSubjectRetrievalInterceptor
ClientBuilder<T> useSubjectRetrievalInterceptor()Enables the use of the SubjectRetrievalInterceptor for this client.
-