Package ch.admin.suis.client.core.service

# Class ValidationServiceClientBuilder

java.lang.Object
ch.admin.suis.client.core.service.ValidationServiceClientBuilder

public abstract class ValidationServiceClientBuilder extends Object
A builder for creating an implementation object for the `IValidationServiceClient` interface.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ValidationServiceClientBuilder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract IValidationServiceClient`
  `build()`
  Build a new validation service client instance using all the configuration previously specified in this builder.
  `abstract ValidationServiceClientBuilder`
  `credential(de.intarsys.aaa.authenticate.impl.UserPasswordCredential credential)`
  Sets the credential to use when the service requires basic authentication.
  `static ValidationServiceClientBuilder`
  `newBuilder()`
  `abstract ValidationServiceClientBuilder`
  `proxyCredential(de.intarsys.aaa.authenticate.impl.UserPasswordCredential proxyCredential)`
  Sets the credential to use when configured proxy requires basic authentication.
  `abstract ValidationServiceClientBuilder`
  `proxyHost(String proxyHost)`
  Sets the name of a proxy server to use when contacting the validation service.
  `abstract ValidationServiceClientBuilder`
  `proxyPort(int proxyPort)`
  Sets the port of a proxy server to use when contacting the validation service.
  `abstract ValidationServiceClientBuilder`
  `serviceUrl(String serviceUrl)`
  Sets the URL of the validation service.
  `abstract ValidationServiceClientBuilder`
  `sslContext(SSLContext sslContext)`
  Sets an `SSLContext` to use when contacting the validation service.
  `abstract ValidationServiceClientBuilder`
  `wireLogging(boolean wireLogging)`
  Sets a flag specifying whether to dump the request and response payload at `INFO` log level.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ValidationServiceClientBuilder

    public ValidationServiceClientBuilder()

- ## Method Details

  - ### newBuilder

    public static ValidationServiceClientBuilder newBuilder()

  - ### build

    public abstract IValidationServiceClient build()
    Build a new validation service client instance using all the configuration previously specified in this builder.
    Returns:
      a new validation service client instance.

  - ### credential

    public abstract ValidationServiceClientBuilder credential(de.intarsys.aaa.authenticate.impl.UserPasswordCredential credential)
    Sets the credential to use when the service requires basic authentication.
    Parameters:
      `credential` - the credential to use
    Returns:
      an updated builder instance

  - ### proxyCredential

    public abstract ValidationServiceClientBuilder proxyCredential(de.intarsys.aaa.authenticate.impl.UserPasswordCredential proxyCredential)
    Sets the credential to use when configured proxy requires basic authentication.
    Parameters:
      `proxyCredential` - the proxy credential to use
    Returns:
      an updated builder instance

  - ### proxyHost

    public abstract ValidationServiceClientBuilder proxyHost(String proxyHost)
    Sets the name of a proxy server to use when contacting the validation service.
    Parameters:
      `proxyHost` - the name of the proxy server
    Returns:
      an updated builder instance

  - ### proxyPort

    public abstract ValidationServiceClientBuilder proxyPort(int proxyPort)
    Sets the port of a proxy server to use when contacting the validation service.
    Parameters:
      `proxyPort` - the port at which the proxy server is listening
    Returns:
      an updated builder instance

  - ### serviceUrl

    public abstract ValidationServiceClientBuilder serviceUrl(String serviceUrl)
    Sets the URL of the validation service. This configuration item is required.
    Parameters:
      `serviceUrl` - the URL of the validation service
    Returns:
      an updated builder instance

  - ### sslContext

    public abstract ValidationServiceClientBuilder sslContext(SSLContext sslContext)
    Sets an `SSLContext` to use when contacting the validation service.
    Parameters:
      `sslContext` - the `SSLContext` to use
    Returns:
      an updated builder instance

  - ### wireLogging

    public abstract ValidationServiceClientBuilder wireLogging(boolean wireLogging)
    Sets a flag specifying whether to dump the request and response payload at `INFO` log level.
    Parameters:
      `wireLogging` - the `SSLContext` to use
    Returns:
      an updated builder instance