Class ConfigureConnectorHandlerBuilder
- java.lang.Object
-
- com.snowflake.connectors.application.configuration.connector.ConfigureConnectorHandlerBuilder
-
public class ConfigureConnectorHandlerBuilder extends Object
Builder for theConfigureConnectorHandler.Allows for customization of the following handler components:
-
-
Constructor Summary
Constructors Constructor Description ConfigureConnectorHandlerBuilder(Session session)Creates a newConfigureConnectorHandlerBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigureConnectorHandlerbuild()Builds a new handler instance.ConfigureConnectorHandlerBuilderwithCallback(ConfigureConnectorCallback callback)Sets the callback used to build the handler instance.ConfigureConnectorHandlerBuilderwithErrorHelper(ConnectorErrorHelper errorHelper)Sets the error helper used to build the handler instance.ConfigureConnectorHandlerBuilderwithInputValidator(ConfigureConnectorInputValidator inputValidator)Sets the input validator used to build the handler instance.
-
-
-
Constructor Detail
-
ConfigureConnectorHandlerBuilder
public ConfigureConnectorHandlerBuilder(Session session)
Creates a newConfigureConnectorHandlerBuilder.The properties of this builder are initialised with:
- a default implementation of
ConfigureConnectorInputValidator - a default implementation of
ConfigureConnectorCallback ConnectorErrorHelperbuilt usingbuildDefault
- Parameters:
session- Snowpark session object- Throws:
NullPointerException- if the provided session object is null
- a default implementation of
-
-
Method Detail
-
withInputValidator
public ConfigureConnectorHandlerBuilder withInputValidator(ConfigureConnectorInputValidator inputValidator)
Sets the input validator used to build the handler instance.- Parameters:
inputValidator- connector configuration input validator- Returns:
- this builder
-
withCallback
public ConfigureConnectorHandlerBuilder withCallback(ConfigureConnectorCallback callback)
Sets the callback used to build the handler instance.- Parameters:
callback- connector configuration callback- Returns:
- this builder
-
withErrorHelper
public ConfigureConnectorHandlerBuilder withErrorHelper(ConnectorErrorHelper errorHelper)
Sets the error helper used to build the handler instance.- Parameters:
errorHelper- connector error helper- Returns:
- this builder
-
build
public ConfigureConnectorHandler build()
Builds a new handler instance.- Returns:
- new handler instance
- Throws:
NullPointerException- if any property for the new handler is null
-
-