Class ClientOptions.Builder
java.lang.Object
io.superdurable.dex.ClientOptions.Builder
- Enclosing class:
ClientOptions
Builds immutable Client options.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds immutable options for a Client.credential(Credential value) Sets the token source for every Client FlowService call.objectMapper(com.fasterxml.jackson.databind.ObjectMapper value) Sets the Jackson mapper for application values.serverAddress(String value) Sets the Dex gRPC server target.
-
Method Details
-
serverAddress
Sets the Dex gRPC server target.- Parameters:
value- the server target; the default islocalhost:8801- Returns:
- this builder
-
objectMapper
Sets the Jackson mapper for application values.- Parameters:
value- a nonnull mapper- Returns:
- this builder
- Throws:
IllegalArgumentException- if value is null
-
credential
Sets the token source for every Client FlowService call.The source can be called concurrently and must not block. A failure prevents Dex contact and throws
DexServiceExceptionwith gRPCUNAUTHENTICATED. The defaultnullsends no authorization metadata. See the builder example above.- Parameters:
value- the credential, ornullto send no token- Returns:
- this builder
-
build
Builds immutable options for a Client.- Returns:
- the configured options
- Throws:
IllegalArgumentException- if the mapper is null
-