Class Driver
- java.lang.Object
-
- org.apache.calcite.avatica.UnregisteredDriver
-
- org.apache.calcite.avatica.remote.Driver
-
- All Implemented Interfaces:
java.sql.Driver
public class Driver extends UnregisteredDriver
Avatica Remote JDBC driver.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDriver.SerializationDefines the method of message serialization used by the Driver-
Nested classes/interfaces inherited from class org.apache.calcite.avatica.UnregisteredDriver
UnregisteredDriver.JdbcVersion
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONNECT_STRING_PREFIXprivate static org.slf4j.LoggerLOG-
Fields inherited from class org.apache.calcite.avatica.UnregisteredDriver
factory, handler
-
-
Constructor Summary
Constructors Constructor Description Driver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.Connectionconnect(java.lang.String url, java.util.Properties info)protected DriverVersioncreateDriverVersion()Creates an object describing the name and version of this driver.(package private) KerberosConnectioncreateKerberosUtility(ConnectionConfig config)MetacreateMeta(AvaticaConnection connection)Creates a service handler that will give connections from this Driver their behavior.(package private) ServicecreateService(AvaticaConnection connection, ConnectionConfig config)Creates aServicewith the givenAvaticaConnectionand configuration.protected java.util.Collection<ConnectionProperty>getConnectionProperties()Returns the connection properties supported by this driver.protected java.lang.StringgetConnectStringPrefix()Returns the prefix of the connect string that this driver will recognize as its own.(package private) AvaticaHttpClientgetHttpClient(AvaticaConnection connection, ConnectionConfig config)Creates the HTTP client that communicates with the Avatica server.(package private) Driver.SerializationgetSerialization(ConnectionConfig config)-
Methods inherited from class org.apache.calcite.avatica.UnregisteredDriver
acceptsURL, createFactory, createHandler, getDriverVersion, getFactoryClassName, getMajorVersion, getMinorVersion, getParentLogger, getPropertyInfo, instantiateFactory, jdbcCompliant, register
-
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
CONNECT_STRING_PREFIX
public static final java.lang.String CONNECT_STRING_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConnectStringPrefix
protected java.lang.String getConnectStringPrefix()
Description copied from class:UnregisteredDriverReturns the prefix of the connect string that this driver will recognize as its own. For example, "jdbc:calcite:".- Specified by:
getConnectStringPrefixin classUnregisteredDriver
-
createDriverVersion
protected DriverVersion createDriverVersion()
Description copied from class:UnregisteredDriverCreates an object describing the name and version of this driver. Called from the driver constructor.- Specified by:
createDriverVersionin classUnregisteredDriver
-
getConnectionProperties
protected java.util.Collection<ConnectionProperty> getConnectionProperties()
Description copied from class:UnregisteredDriverReturns the connection properties supported by this driver.- Overrides:
getConnectionPropertiesin classUnregisteredDriver
-
createMeta
public Meta createMeta(AvaticaConnection connection)
Description copied from class:UnregisteredDriverCreates a service handler that will give connections from this Driver their behavior.- Specified by:
createMetain classUnregisteredDriver
-
createKerberosUtility
KerberosConnection createKerberosUtility(ConnectionConfig config)
-
createService
Service createService(AvaticaConnection connection, ConnectionConfig config)
Creates aServicewith the givenAvaticaConnectionand configuration.- Parameters:
connection- TheAvaticaConnectionto use.config- Configuration properties- Returns:
- A Service implementation.
-
getHttpClient
AvaticaHttpClient getHttpClient(AvaticaConnection connection, ConnectionConfig config)
Creates the HTTP client that communicates with the Avatica server.- Parameters:
connection- TheAvaticaConnection.config- The configuration.- Returns:
- An
AvaticaHttpClientimplementation.
-
connect
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException- Specified by:
connectin interfacejava.sql.Driver- Overrides:
connectin classUnregisteredDriver- Throws:
java.sql.SQLException
-
getSerialization
Driver.Serialization getSerialization(ConnectionConfig config)
-
-