Class FinalizeConnectorHandlerTestBuilder


  • public class FinalizeConnectorHandlerTestBuilder
    extends com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandlerBuilder
    Test builder for the FinalizeConnectorHandler.

    Allows for customization of the following handler components:

    • FinalizeConnectorInputValidator
    • SourceValidator
    • FinalizeConnectorCallback
    • ConnectorErrorHelper
    • ConnectorStatusService
    • Constructor Detail

      • FinalizeConnectorHandlerTestBuilder

        public FinalizeConnectorHandlerTestBuilder()
        Creates a new, empty FinalizeConnectorHandlerTestBuilder.

        Properties of the new builder instance must be fully customized before a handler instance can be built.

      • FinalizeConnectorHandlerTestBuilder

        public FinalizeConnectorHandlerTestBuilder​(Session session)
        Creates a new FinalizeConnectorHandlerTestBuilder.

        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 using buildDefault
        • a default implementation of ConnectorStatusService
        Parameters:
        session - Snowpark session object
        Throws:
        NullPointerException - if the provided session object is null
    • 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 class com.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 class com.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 class com.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 class com.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