Class PauseConnectorHandlerBuilder
- java.lang.Object
-
- com.snowflake.connectors.application.lifecycle.pause.PauseConnectorHandlerBuilder
-
public class PauseConnectorHandlerBuilder extends Object
Builder for thePauseConnectorHandler.Allows for customization of the following handler components:
-
-
Constructor Summary
Constructors Constructor Description PauseConnectorHandlerBuilder(Session session)Creates a newPauseConnectorHandlerBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PauseConnectorHandlerbuild()Builds a new handler instance.PauseConnectorHandlerBuilderwithCallback(PauseConnectorCallback callback)Sets the callback used to build the handler instance.PauseConnectorHandlerBuilderwithErrorHelper(ConnectorErrorHelper errorHelper)Sets the error helper used to build the handler instance.PauseConnectorHandlerBuilderwithStateValidator(PauseConnectorStateValidator stateValidator)Sets the state validator used to build the handler instance.
-
-
-
Constructor Detail
-
PauseConnectorHandlerBuilder
public PauseConnectorHandlerBuilder(Session session)
Creates a newPauseConnectorHandlerBuilder.The properties of this builder are initialised with:
- a default implementation of
PauseConnectorStateValidator - a default implementation of
PauseConnectorCallback ConnectorErrorHelperbuilt usingbuildDefault
- Parameters:
session- Snowpark session object- Throws:
NullPointerException- if the provided session object is null
- a default implementation of
-
-
Method Detail
-
withStateValidator
public PauseConnectorHandlerBuilder withStateValidator(PauseConnectorStateValidator stateValidator)
Sets the state validator used to build the handler instance.- Parameters:
stateValidator- connector state validator- Returns:
- this builder
-
withCallback
public PauseConnectorHandlerBuilder withCallback(PauseConnectorCallback callback)
Sets the callback used to build the handler instance.- Parameters:
callback- pause connector callback- Returns:
- this builder
-
withErrorHelper
public PauseConnectorHandlerBuilder withErrorHelper(ConnectorErrorHelper errorHelper)
Sets the error helper used to build the handler instance.- Parameters:
errorHelper- connector error helper- Returns:
- this builder
-
build
public PauseConnectorHandler build()
Builds a new handler instance.- Returns:
- new handler instance
- Throws:
NullPointerException- if any property for the new handler is null
-
-