Package org.forgerock.services.context
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 creatingClientContext
instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientContext
build()
Creates aClientContext
instance from the specified properties.ClientContext.Builder
certificates(Certificate... certificates)
Sets the client's certificates.ClientContext.Builder
certificates(List<Certificate> certificates)
Sets the client's certificates.ClientContext.Builder
localAddress(String localAddress)
Sets the local server's address.ClientContext.Builder
localPort(int localPort)
Sets the local server's port.ClientContext.Builder
remoteAddress(String remoteAddress)
Sets the client's remote address.ClientContext.Builder
remotePort(int remotePort)
Sets the client's remote port.ClientContext.Builder
remoteUser(String remoteUser)
Sets the client's remote user.ClientContext.Builder
secure(boolean isSecure)
Sets whether if the client connection is secure.ClientContext.Builder
userAgent(String userAgent)
Sets the client's user agent.
-
-
-
Method Detail
-
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(List)
-
certificates
public ClientContext.Builder certificates(List<Certificate> certificates)
Sets the client's certificates.- Parameters:
certificates
- TheList
of certificates.- Returns:
- The builder instance.
- See Also:
certificates(Certificate...)
-
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 aClientContext
instance from the specified properties.- Returns:
- A
ClientContext
instance.
-
-