public class DriverConnectionProvider extends java.lang.Object implements ConnectionProvider
ConnectionProvider interface. It creates and returns a connection
provided by a target driver or a data source.| Constructor and Description |
|---|
DriverConnectionProvider(java.sql.Driver driver) |
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
connect(@NonNull java.lang.String protocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props)
Called once per connection that needs to be created.
|
java.sql.Connection |
connect(@NonNull java.lang.String url,
@NonNull java.util.Properties props)
Called once per connection that needs to be created.
|
public java.sql.Connection connect(@NonNull java.lang.String protocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props)
throws java.sql.SQLException
connect in interface ConnectionProviderprotocol - The connection protocol (example "jdbc:mysql://")hostSpec - The HostSpec containing the host-port information for the host to connect toprops - The Properties to use for the connectionConnection resulting from the given connection informationjava.sql.SQLException - if an error occurspublic java.sql.Connection connect(@NonNull java.lang.String url,
@NonNull java.util.Properties props)
throws java.sql.SQLException
connect in interface ConnectionProviderurl - The connection URLprops - The Properties to use for the connectionConnection resulting from the given connection informationjava.sql.SQLException - if an error occurs