Class ConnectionConfigurationHandler
- java.lang.Object
- 
- com.snowflake.connectors.application.configuration.connection.ConnectionConfigurationHandler
 
- 
 public class ConnectionConfigurationHandler extends Object Handler for the connection configuration process. A new instance of the handler must be created usingthe builder.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringERROR_TYPEError type for the connection configuration failure, used by theConnectorErrorHelper.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConnectionConfigurationHandlerBuilderbuilder(Session session)Returns a new instance ofConnectionConfigurationHandlerBuilder.static VariantsetConnectionConfiguration(Session session, Variant configuration)Default handler method for thePUBLIC.SET_CONNECTION_CONFIGURATIONprocedure.ConnectorResponsesetConnectionConfiguration(Variant configuration)Executes the main logic of the handler, with logging usingwithExceptionLogging.
 
- 
- 
- 
Field Detail- 
ERROR_TYPEpublic static final String ERROR_TYPE Error type for the connection configuration failure, used by theConnectorErrorHelper.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setConnectionConfigurationpublic static Variant setConnectionConfiguration(Session session, Variant configuration) Default handler method for thePUBLIC.SET_CONNECTION_CONFIGURATIONprocedure.- Parameters:
- session- Snowpark session object
- configuration- connection configuration properties
- Returns:
- a variant representing the ConnectorResponsereturned bysetConnectionConfiguration
 
 - 
builderpublic static ConnectionConfigurationHandlerBuilder builder(Session session) Returns a new instance ofConnectionConfigurationHandlerBuilder.- Parameters:
- session- Snowpark session object
- Returns:
- a new builder instance
 
 - 
setConnectionConfigurationpublic ConnectorResponse setConnectionConfiguration(Variant configuration) Executes the main logic of the handler, with logging usingwithExceptionLogging.The handler logic consists of: - connector status check
- ConnectionConfigurationInputValidator.validate(Variant)
- ConnectionConfigurationCallback.execute(Variant)
- ConnectionValidator.validate()
- connector status update
 - Parameters:
- configuration- connection configuration properties
- Returns:
- a response with the code OKif the execution was successful, otherwise a response with an error code and an error message
 
 
- 
 
-