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 Details

    • build

    • endpoint

      ClientBuilder<T> endpoint(String endpointUrl)
      The endpoint the client should connect to.
      Parameters:
      endpointUrl -
      Returns:
    • interfaceClass

      ClientBuilder<T> interfaceClass(Class<T> interfaceClass)
      The JAX-RS interface class/type that represents the endpoint
      Parameters:
      interfaceClass -
      Returns:
    • entityProviders

      ClientBuilder<T> entityProviders(List<? extends Object> entityProviders)
    • interceptor

      ClientBuilder<T> interceptor(org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message> interceptor)
    • disableCnCheck

      ClientBuilder<T> disableCnCheck(boolean disableCnCheck)
      Turns the CN check off when performing a TLS/SSL connection. This is for test only.
      Parameters:
      disableCnCheck -
      Returns:
    • allowRedirects

      ClientBuilder<T> allowRedirects(boolean allowRedirects)
      Whether or not to allow the client to follow redirects.
      Parameters:
      allowRedirects -
      Returns:
    • connectionTimeout

      ClientBuilder<T> connectionTimeout(Integer connectionTimeout)
      Time before the connection will fail with no reply.
      Parameters:
      connectionTimeout -
      Returns:
    • receiveTimeout

      ClientBuilder<T> receiveTimeout(Integer receiveTimeout)
      Time before connection will fail with no response.
      Parameters:
      receiveTimeout -
      Returns:
    • username

      ClientBuilder<T> username(String username)
      Username to use with BASIC authentication.
      Parameters:
      username -
      Returns:
    • password

      ClientBuilder<T> password(String password)
      Password to use with BASIC authentication
      Parameters:
      password -
      Returns:
    • clientKeyInfo

      ClientBuilder<T> clientKeyInfo(String certAlias, Path keystorePath)
      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

      ClientBuilder<T> sslProtocol(String sslProtocol)
      SSL/TLS protocol to use. This shouldn't need to be used in most instances.
      Parameters:
      sslProtocol -
      Returns:
    • sourceId

      ClientBuilder<T> sourceId(String sourceId)
      Source ID for OAuth.
      Parameters:
      sourceId -
      Returns:
    • discovery

      ClientBuilder<T> discovery(URI discoveryUrl)
      Discovery URL for OAuth.
      Parameters:
      discoveryUrl -
      Returns:
    • clientId

      ClientBuilder<T> clientId(String clientId)
      Client ID for OAuth.
      Parameters:
      clientId -
      Returns:
    • clientSecret

      ClientBuilder<T> clientSecret(String clientSecret)
      Client secret for OAuth.
      Parameters:
      clientSecret -
      Returns:
    • oauthFlow

      ClientBuilder<T> oauthFlow(String oauthFlow)
      OAuth flow to use.
      Parameters:
      oauthFlow -
      Returns:
    • additionalOauthParameters

      ClientBuilder<T> additionalOauthParameters(Map<String,String> additionalParameters)
      Additional OAuth parameters to use.
      Parameters:
      additionalParameters -
      Returns:
    • propertyResolver

      ClientBuilder<T> propertyResolver(org.codice.ddf.configuration.PropertyResolver propertyResolver)
      Property resolver to use to replace any properties in the endpoint URL
      Parameters:
      propertyResolver -
      Returns:
    • useOAuth

      ClientBuilder<T> useOAuth(boolean useOAuth)
      True will enable the use of OAuth for this client.
      Parameters:
      useOAuth -
      Returns:
    • useSamlEcp

      ClientBuilder<T> useSamlEcp(boolean 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.