Class FinalizeConnectorHandler
- java.lang.Object
-
- com.snowflake.connectors.application.configuration.finalization.FinalizeConnectorHandler
-
public class FinalizeConnectorHandler extends Object
Handler for the configuration finalization process. A new instance of the handler must be created usingthe builder
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FinalizeConnectorHandlerBuilder
builder(Session session)
Returns a new instance ofFinalizeConnectorHandlerBuilder
.static Variant
finalizeConnectorConfiguration(Session session, Variant configuration)
Default handler method for thePUBLIC.FINALIZE_CONNECTOR_CONFIGURATION
procedure.ConnectorResponse
finalizeConnectorConfiguration(Variant configuration)
Executes the main logic of the handler, with logging usingwithExceptionLogging
.
-
-
-
Method Detail
-
finalizeConnectorConfiguration
public static Variant finalizeConnectorConfiguration(Session session, Variant configuration)
Default handler method for thePUBLIC.FINALIZE_CONNECTOR_CONFIGURATION
procedure.- Parameters:
session
- Snowpark session objectconfiguration
- custom configuration properties- Returns:
- a variant representing the
ConnectorResponse
returned byfinalizeConnectorConfiguration
-
builder
public static FinalizeConnectorHandlerBuilder builder(Session session)
Returns a new instance ofFinalizeConnectorHandlerBuilder
.- Parameters:
session
- Snowpark session object- Returns:
- a new builder instance
-
finalizeConnectorConfiguration
public ConnectorResponse finalizeConnectorConfiguration(Variant configuration)
Executes the main logic of the handler, with logging usingwithExceptionLogging
.The handler logic consists of:
- connector status check
FinalizeConnectorInputValidator.validate(Variant)
SourceValidator.validate(Variant)
FinalizeConnectorCallback.execute(Variant)
- connector status update
Be aware - this handler does not persist any provided configuration, any such logic has to be implemented using a custom
FinalizeConnectorCallback
.- Parameters:
configuration
- custom configuration properties- Returns:
- a response with the code
OK
if the execution was successful, otherwise a response with an error code and an error message
-
-