Package io.dialob.client.api
Class ImmutableDialobClientConfig.Builder
- java.lang.Object
-
- io.dialob.client.api.ImmutableDialobClientConfig.Builder
-
- Enclosing class:
- ImmutableDialobClientConfig
@NotThreadSafe public static final class ImmutableDialobClientConfig.Builder extends Object
Builds instances of typeImmutableDialobClientConfig. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder from(DialobClientConfig instance)
Fill a builder with attribute values from the providedDialobClientConfiginstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
store
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder store(DialobStore store)
Initializes the value for thestoreattribute.- Parameters:
store- The value for store- Returns:
thisbuilder for use in a chained invocation
-
cache
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder cache(DialobCache cache)
Initializes the value for thecacheattribute.- Parameters:
cache- The value for cache- Returns:
thisbuilder for use in a chained invocation
-
factory
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder factory(DialobSessionEvalContextFactory factory)
Initializes the value for thefactoryattribute.- Parameters:
factory- The value for factory- Returns:
thisbuilder for use in a chained invocation
-
asyncFunctionInvoker
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder asyncFunctionInvoker(AsyncFunctionInvoker asyncFunctionInvoker)
Initializes the value for theasyncFunctionInvokerattribute.- Parameters:
asyncFunctionInvoker- The value for asyncFunctionInvoker- Returns:
thisbuilder for use in a chained invocation
-
eventPublisher
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder eventPublisher(QuestionnaireEventPublisher eventPublisher)
Initializes the value for theeventPublisherattribute.- Parameters:
eventPublisher- The value for eventPublisher- Returns:
thisbuilder for use in a chained invocation
-
mapper
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder mapper(DialobClient.TypesMapper mapper)
Initializes the value for themapperattribute.- Parameters:
mapper- The value for mapper- Returns:
thisbuilder for use in a chained invocation
-
compiler
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder compiler(DialobProgramFromFormCompiler compiler)
Initializes the value for thecompilerattribute.- Parameters:
compiler- The value for compiler- Returns:
thisbuilder for use in a chained invocation
-
errorHandler
@CanIgnoreReturnValue public final ImmutableDialobClientConfig.Builder errorHandler(DialobErrorHandler errorHandler)
Initializes the value for theerrorHandlerattribute.- Parameters:
errorHandler- The value for errorHandler- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDialobClientConfig build()
Builds a newImmutableDialobClientConfig.- Returns:
- An immutable instance of DialobClientConfig
- Throws:
IllegalStateException- if any required attributes are missing
-
-