Class ClientContext.Builder

java.lang.Object
org.forgerock.services.context.ClientContext.Builder
Enclosing class:
ClientContext

public static final class ClientContext.Builder extends Object
Builder for creating ClientContext instances.
  • Method Details

    • remoteUser

      public ClientContext.Builder remoteUser(String remoteUser)
      Sets the client's remote user.
      Parameters:
      remoteUser - The remote user.
      Returns:
      The builder instance.
    • remoteAddress

      public ClientContext.Builder remoteAddress(String remoteAddress)
      Sets the client's remote address.
      Parameters:
      remoteAddress - The remove address.
      Returns:
      The builder instance.
    • remotePort

      public ClientContext.Builder remotePort(int remotePort)
      Sets the client's remote port.
      Parameters:
      remotePort - The remote port.
      Returns:
      The builder instance.
    • certificates

      public ClientContext.Builder certificates(Certificate... certificates)
      Sets the client's certificates.
      Parameters:
      certificates - The list of certificates.
      Returns:
      The builder instance.
      See Also:
    • certificates

      public ClientContext.Builder certificates(List<Certificate> certificates)
      Sets the client's certificates.
      Parameters:
      certificates - The List of certificates.
      Returns:
      The builder instance.
      See Also:
    • userAgent

      public ClientContext.Builder userAgent(String userAgent)
      Sets the client's user agent.
      Parameters:
      userAgent - The user agent.
      Returns:
      The builder instance.
    • secure

      public ClientContext.Builder secure(boolean isSecure)
      Sets whether if the client connection is secure.
      Parameters:
      isSecure - true if the client connection is secure, false otherwise.
      Returns:
      The builder instance.
    • localAddress

      public ClientContext.Builder localAddress(String localAddress)
      Sets the local server's address.
      Parameters:
      localAddress - The local address.
      Returns:
      The builder instance.
    • localPort

      public ClientContext.Builder localPort(int localPort)
      Sets the local server's port.
      Parameters:
      localPort - The local port.
      Returns:
      The builder instance.
    • build

      public ClientContext build()
      Creates a ClientContext instance from the specified properties.
      Returns:
      A ClientContext instance.