Class FinalizeConnectorHandlerTestBuilder
- java.lang.Object
-
- com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandlerBuilder
-
- com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandlerTestBuilder
-
public class FinalizeConnectorHandlerTestBuilder extends com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandlerBuilder
Test builder for theFinalizeConnectorHandler
.Allows for customization of the following handler components:
FinalizeConnectorInputValidator
SourceValidator
FinalizeConnectorCallback
ConnectorErrorHelper
ConnectorStatusService
-
-
Constructor Summary
Constructors Constructor Description FinalizeConnectorHandlerTestBuilder()
Creates a new, emptyFinalizeConnectorHandlerTestBuilder
.FinalizeConnectorHandlerTestBuilder(Session session)
Creates a newFinalizeConnectorHandlerTestBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FinalizeConnectorHandlerTestBuilder
withCallback(com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorCallback callback)
Sets the callback used to build the handler instance.FinalizeConnectorHandlerTestBuilder
withConnectorStatusService(com.snowflake.connectors.application.status.ConnectorStatusService connectorStatusService)
Sets the connector status service used to build the handler instance.FinalizeConnectorHandlerTestBuilder
withErrorHelper(com.snowflake.connectors.common.exception.helper.ConnectorErrorHelper errorHelper)
Sets the error helper used to build the handler instance.FinalizeConnectorHandlerTestBuilder
withInputValidator(com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorInputValidator inputValidator)
Sets the input validator used to build the handler instance.FinalizeConnectorHandlerTestBuilder
withSdkCallback(com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorSdkCallback sdkCallback)
Sets the sdk callback used to build the handler instance.FinalizeConnectorHandlerTestBuilder
withSourceValidator(com.snowflake.connectors.application.configuration.finalization.SourceValidator sourceValidator)
Sets the source validator used to build the handler instance.
-
-
-
Constructor Detail
-
FinalizeConnectorHandlerTestBuilder
public FinalizeConnectorHandlerTestBuilder()
Creates a new, emptyFinalizeConnectorHandlerTestBuilder
.Properties of the new builder instance must be fully customized before a handler instance can be built.
-
FinalizeConnectorHandlerTestBuilder
public FinalizeConnectorHandlerTestBuilder(Session session)
Creates a newFinalizeConnectorHandlerTestBuilder
.The properties of this builder are initialised with:
- a default implementation of
FinalizeConnectorInputValidator
- a default implementation of
SourceValidator
- a default implementation of
FinalizeConnectorCallback
ConnectorErrorHelper
built usingbuildDefault
- a default implementation of
ConnectorStatusService
- Parameters:
session
- Snowpark session object- Throws:
NullPointerException
- if the provided session object is null
- a default implementation of
-
-
Method Detail
-
withInputValidator
public FinalizeConnectorHandlerTestBuilder withInputValidator(com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorInputValidator inputValidator)
Sets the input validator used to build the handler instance.- Overrides:
withInputValidator
in classcom.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandlerBuilder
- Parameters:
inputValidator
- configuration finalization input validator- Returns:
- this builder
-
withSourceValidator
public FinalizeConnectorHandlerTestBuilder withSourceValidator(com.snowflake.connectors.application.configuration.finalization.SourceValidator sourceValidator)
Sets the source validator used to build the handler instance.- Overrides:
withSourceValidator
in classcom.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandlerBuilder
- Parameters:
sourceValidator
- source finalization input validator- Returns:
- this builder
-
withCallback
public FinalizeConnectorHandlerTestBuilder withCallback(com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorCallback callback)
Sets the callback used to build the handler instance.- Overrides:
withCallback
in classcom.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandlerBuilder
- Parameters:
callback
- configuration finalization callback- Returns:
- this builder
-
withErrorHelper
public FinalizeConnectorHandlerTestBuilder withErrorHelper(com.snowflake.connectors.common.exception.helper.ConnectorErrorHelper errorHelper)
Sets the error helper used to build the handler instance.- Overrides:
withErrorHelper
in classcom.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandlerBuilder
- Parameters:
errorHelper
- connector error helper- Returns:
- this builder
-
withConnectorStatusService
public FinalizeConnectorHandlerTestBuilder withConnectorStatusService(com.snowflake.connectors.application.status.ConnectorStatusService connectorStatusService)
Sets the connector status service used to build the handler instance.- Parameters:
connectorStatusService
- connector status service- Returns:
- this builder
-
withSdkCallback
public FinalizeConnectorHandlerTestBuilder withSdkCallback(com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorSdkCallback sdkCallback)
Sets the sdk callback used to build the handler instance.- Parameters:
sdkCallback
- internal sdk callback- Returns:
- this builder
-
-