Top Description Inners Fields Constructors Methods
com.mysql.cj.conf

public abstract Class ConnectionUrl

extends Object
implements DatabaseUrlContainer
Class Inheritance
All Implemented Interfaces
com.mysql.cj.conf.DatabaseUrlContainer
Known Direct Subclasses
com.mysql.cj.conf.url.FailoverConnectionUrl, com.mysql.cj.conf.url.FailoverDnsSrvConnectionUrl, com.mysql.cj.conf.url.LoadBalanceConnectionUrl, com.mysql.cj.conf.url.LoadBalanceDnsSrvConnectionUrl, com.mysql.cj.conf.url.ReplicationConnectionUrl, com.mysql.cj.conf.url.ReplicationDnsSrvConnectionUrl, com.mysql.cj.conf.url.SingleConnectionUrl, com.mysql.cj.conf.url.XDevApiConnectionUrl, com.mysql.cj.conf.url.XDevApiDnsSrvConnectionUrl
Static Imports
com.mysql.cj.util.StringUtils.isNullOrEmpty

A container for a database URL and a collection of given connection arguments. The connection string is parsed and split by its components, each of which is then processed and fixed according to the needs of the connection type. This abstract class holds all common behavior to all connection string types. Its subclasses must implement their own specifics such as classifying hosts by type or apply validation rules.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
ConnectionUrl.HostsCardinality

The rules describing the number of hosts a database URL may contain.

public static enum
ConnectionUrl.Type

The database URL type which is determined by the scheme section of the connection string.

Field Summary

Modifier and TypeField and Description
private static final LRUCache<String, ConnectionUrl>
public static final String
public static final int
protected List<HostInfo>
protected String
protected String
protected Map<String, String>
pack-priv ConnectionPropertiesTransform
private static final ReadWriteLock
protected ConnectionUrl.Type

Constructor Summary

AccessConstructor and Description
protected
ConnectionUrl()

Empty constructor.

public
ConnectionUrl(String
URLs
origUrl
)

Constructor for unsupported URLs

protected
ConnectionUrl(ConnectionUrlParser
a ConnectionUrlParser instance containing the parsed version of the original connection string
connStrParser
,
Properties
the connection arguments map
info
)

Constructs an instance of ConnectionUrl, performing all the required initializations.

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true if this class is able to process the given URL, false otherwise
acceptsUrl
(String
the connection string
connString
)

Checks if this ConnectionUrl is able to process the given database URL.

private static String

Returns:

a connection string cache map key
buildConnectionStringCacheKey
(String
the connection string
connString
,
Properties
the connection arguments map
info
)

Builds a connection URL cache map key based on the connection string itself plus the string representation of the given connection properties.

protected HostInfo

Returns:

a new instance of HostInfo
buildHostInfo
(String
the host
host
,
int
the port
port
,
String
the user name
user
,
String
the password
password
,
Map<String, String>
the host properties map
hostProps
)

Creates a new HostInfo structure with the given components, passing through the properties transformer if there is one defined in this connection string;

protected void
collectHostsInfo(ConnectionUrlParser
the ConnectionUrlParser from where to collect the hosts information
connStrParser
)

Collects the hosts information from the ConnectionUrlParser.

protected void
collectProperties(ConnectionUrlParser
the ConnectionUrlParser from where to collect the properties
connStrParser
,
Properties
the connection arguments map
info
)

Joins the connection arguments from the connection string with the ones from the given connection arguments map collecting them in a single map.

protected void
expandPropertiesFromConfigFiles(Map<String, String>
a connection arguments map from where to read the "useConfig" property and where to save the loaded properties.
props
)

Expands the connection argument "useConfig" by reading the mentioned configuration files.

protected HostInfo

Returns:

a new HostInfo with all required data
fixHostInfo
(HostInfo
the host information data to fix
hi
)

Fixes the host information by moving data around and filling in missing data.

protected void
fixProtocolDependencies(Map<String, String>
the host properties map to fix
hostProps
)

Fixes the protocol (TCP vs PIPE) dependencies for the given host properties map.

public Properties

Returns:

a Properties instance containing the common connection arguments.
getConnectionArgumentsAsProperties
()

Returns a Properties instance containing the connection arguments extracted from the URL query section, i.e., per host attributes are excluded.

public static ConnectionUrl

Returns:

an instance of a ConnectionUrl or "null" if isn't able to handle the connection string
getConnectionUrlInstance
(String
the connection string
connString
,
Properties
the connection arguments map
info
)

Static factory method that returns either a new instance of a ConnectionUrl or a cached one.

public String

Returns:

the database name
getDatabase
()

Returns the database from this connection URL.

public String

Returns:

the original database URL
getDatabaseUrl
()

Implements com.mysql.cj.conf.DatabaseUrlContainer.getDatabaseUrl.

Returns the original database URL that produced this connection string.

public String

Returns:

the default host
getDefaultHost
()

Returns the default host.

public String

Returns:

the default password
getDefaultPassword
()

Returns the default password.

public int

Returns:

the default port
getDefaultPort
()

Returns the default port.

public String

Returns:

the default user
getDefaultUser
()

Returns the default user.

public HostInfo

Returns:

the existing host info or a new independent one
getHostOrSpawnIsolated
(String
the host:port part to search for
hostPortPair
)

Returns an existing host info with the same host:port part or spawns a new isolated host info based on this connection URL if none was found.

public HostInfo

Returns:

the existing host info or a new independent one
getHostOrSpawnIsolated
(String
the host:port part to search for
hostPortPair
,
List<HostInfo>
the hosts list from where to search the host list
hostsList
)

Returns an existing host info with the same host:port part or spawns a new isolated host info based on this connection URL if none was found.

public List<HostInfo>

Returns:

the hosts list from this connection URL
getHostsList
()

Returns a list of the hosts in this connection URL.

public List<HostInfo>

Returns:

the hosts list from this connection URL, filtered for the given view.
getHostsList
(HostsListView
the type of the view to use in the returned list of hosts. This argument is ignored in this implementation.
view
)

Returns a list of the hosts in this connection URL, filtered for the given view.

public List<HostInfo>

Returns:

the hosts list from the result of the DNS SRV lookup, filtered for the given view.
getHostsListFromDnsSrv
(HostInfo
the HostInfo from where to get the DNS SRV service name to lookup.
srvHost
)

Returns a hosts list built from the result of the DNS SRV lookup for the original host name.

public HostInfo

Returns:

the first host info structure
getMainHost
()

Returns the single or first host info structure.

public Map<String, String>

Returns:

the original (common to all hosts) connection arguments
getOriginalProperties
()

Returns the original (common to all hosts) connection arguments as provided in the connection string query section.

public static Properties

Returns:

the map containing all the properties read
getPropertiesFromConfigFiles
(String
the list of the configuration files to read
configFiles
)

Returns a map containing the properties read from the given configuration files.

public ConnectionUrl.Type

Returns:

the connection URL type
getType
()

Returns this connection URL type.

public int

Returns:

the number of hosts
hostsCount
()

Returns the number of hosts in this connection URL.

protected void
injectPerTypeProperties(Map<String, String>
the properties already containing all known connection arguments
props
)

Subclasses must override this method if they need to inject additional properties in the connection arguments map while it's being constructed.

protected void
preprocessPerTypeHostProperties(Map<String, String>
the host properties map to process
hostProps
)

Subclasses should override this to perform any required pre-processing on the host information properties.

protected void
replaceLegacyPropertyValues(Map<String, String>
the host properties map to fix
props
)

Some acceptable property values have changed in c/J 8.0 but old values remain hard-coded in widely used software.

protected void
private List<HostInfo>

Returns:

a list of hosts.
srvRecordsToHostsList
(List<DnsSrv.SrvRecord>
the list of DNS SRV records.
srvRecords
,
HostInfo
the HostInfo to use as source of all common host specific options.
baseHostInfo
)

Converts a list of DNS SRV records into a hosts list.

public String

Returns:

a string representation of this object
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

connectionUrlCacheback to summary
private static final LRUCache<String, ConnectionUrl> connectionUrlCache
DEFAULT_HOSTback to summary
public static final String DEFAULT_HOST
DEFAULT_PORTback to summary
public static final int DEFAULT_PORT
hostsback to summary
protected List<HostInfo> hosts
originalConnStrback to summary
protected String originalConnStr
originalDatabaseback to summary
protected String originalDatabase
propertiesback to summary
protected Map<String, String> properties
propertiesTransformerback to summary
pack-priv ConnectionPropertiesTransform propertiesTransformer
rwLockback to summary
private static final ReadWriteLock rwLock
typeback to summary
protected ConnectionUrl.Type type

Constructor Detail

ConnectionUrlback to summary
protected ConnectionUrl()

Empty constructor. Required for subclasses initialization.

ConnectionUrlback to summary
public ConnectionUrl(String origUrl)

Constructor for unsupported URLs

Parameters
origUrl:String

URLs

ConnectionUrlback to summary
protected ConnectionUrl(ConnectionUrlParser connStrParser, Properties info)

Constructs an instance of ConnectionUrl, performing all the required initializations.

Parameters
connStrParser:ConnectionUrlParser

a ConnectionUrlParser instance containing the parsed version of the original connection string

info:Properties

the connection arguments map

Method Detail

acceptsUrlback to summary
public static boolean acceptsUrl(String connString)

Checks if this ConnectionUrl is able to process the given database URL.

Parameters
connString:String

the connection string

Returns:boolean

true if this class is able to process the given URL, false otherwise

buildConnectionStringCacheKeyback to summary
private static String buildConnectionStringCacheKey(String connString, Properties info)

Builds a connection URL cache map key based on the connection string itself plus the string representation of the given connection properties.

Parameters
connString:String

the connection string

info:Properties

the connection arguments map

Returns:String

a connection string cache map key

buildHostInfoback to summary
protected HostInfo buildHostInfo(String host, int port, String user, String password, Map<String, String> hostProps)

Creates a new HostInfo structure with the given components, passing through the properties transformer if there is one defined in this connection string;

Parameters
host:String

the host

port:int

the port

user:String

the user name

password:String

the password

hostProps:Map<String, String>

the host properties map

Returns:HostInfo

a new instance of HostInfo

collectHostsInfoback to summary
protected void collectHostsInfo(ConnectionUrlParser connStrParser)

Collects the hosts information from the ConnectionUrlParser.

Parameters
connStrParser:ConnectionUrlParser

the ConnectionUrlParser from where to collect the hosts information

collectPropertiesback to summary
protected void collectProperties(ConnectionUrlParser connStrParser, Properties info)

Joins the connection arguments from the connection string with the ones from the given connection arguments map collecting them in a single map. Additionally may also collect other connection arguments from configuration files.

Parameters
connStrParser:ConnectionUrlParser

the ConnectionUrlParser from where to collect the properties

info:Properties

the connection arguments map

expandPropertiesFromConfigFilesback to summary
protected void expandPropertiesFromConfigFiles(Map<String, String> props)

Expands the connection argument "useConfig" by reading the mentioned configuration files.

Parameters
props:Map<String, String>

a connection arguments map from where to read the "useConfig" property and where to save the loaded properties.

fixHostInfoback to summary
protected HostInfo fixHostInfo(HostInfo hi)

Fixes the host information by moving data around and filling in missing data. Applies properties transformations to the collected properties if ConnectionPropertiesTransform was declared in the connection arguments.

Parameters
hi:HostInfo

the host information data to fix

Returns:HostInfo

a new HostInfo with all required data

fixProtocolDependenciesback to summary
protected void fixProtocolDependencies(Map<String, String> hostProps)

Fixes the protocol (TCP vs PIPE) dependencies for the given host properties map.

Parameters
hostProps:Map<String, String>

the host properties map to fix

getConnectionArgumentsAsPropertiesback to summary
public Properties getConnectionArgumentsAsProperties()

Returns a Properties instance containing the connection arguments extracted from the URL query section, i.e., per host attributes are excluded. Applies properties transformations to the collected properties if ConnectionPropertiesTransform was declared in the connection arguments.

Returns:Properties

a Properties instance containing the common connection arguments.

getConnectionUrlInstanceback to summary
public static ConnectionUrl getConnectionUrlInstance(String connString, Properties info)

Static factory method that returns either a new instance of a ConnectionUrl or a cached one. Returns "null" it can't handle the connection string.

Parameters
connString:String

the connection string

info:Properties

the connection arguments map

Returns:ConnectionUrl

an instance of a ConnectionUrl or "null" if isn't able to handle the connection string

getDatabaseback to summary
public String getDatabase()

Returns the database from this connection URL. Note that a "DBNAME" property overrides the database identified in the connection string.

Returns:String

the database name

getDatabaseUrlback to summary
public String getDatabaseUrl()

Implements com.mysql.cj.conf.DatabaseUrlContainer.getDatabaseUrl.

Returns the original database URL that produced this connection string.

Returns:String

the original database URL

Annotations
@Override
getDefaultHostback to summary
public String getDefaultHost()

Returns the default host. Subclasses must override this method if they have different default host value.

Returns:String

the default host

getDefaultPasswordback to summary
public String getDefaultPassword()

Returns the default password. Usually the one provided in the method DriverManager#getConnection(String, String, String) or as connection argument.

Returns:String

the default password

getDefaultPortback to summary
public int getDefaultPort()

Returns the default port. Subclasses must override this method if they have different default port value.

Returns:int

the default port

getDefaultUserback to summary
public String getDefaultUser()

Returns the default user. Usually the one provided in the method DriverManager#getConnection(String, String, String) or as connection argument.

Returns:String

the default user

getHostOrSpawnIsolatedback to summary
public HostInfo getHostOrSpawnIsolated(String hostPortPair)

Returns an existing host info with the same host:port part or spawns a new isolated host info based on this connection URL if none was found.

Parameters
hostPortPair:String

the host:port part to search for

Returns:HostInfo

the existing host info or a new independent one

getHostOrSpawnIsolatedback to summary
public HostInfo getHostOrSpawnIsolated(String hostPortPair, List<HostInfo> hostsList)

Returns an existing host info with the same host:port part or spawns a new isolated host info based on this connection URL if none was found.

Parameters
hostPortPair:String

the host:port part to search for

hostsList:List<HostInfo>

the hosts list from where to search the host list

Returns:HostInfo

the existing host info or a new independent one

getHostsListback to summary
public List<HostInfo> getHostsList()

Returns a list of the hosts in this connection URL.

Returns:List<HostInfo>

the hosts list from this connection URL

getHostsListback to summary
public List<HostInfo> getHostsList(HostsListView view)

Returns a list of the hosts in this connection URL, filtered for the given view. By default returns all hosts. Subclasses should override this method in order to implement support for different views, usually by splitting the global hosts into smaller sub-lists.

Parameters
view:HostsListView

the type of the view to use in the returned list of hosts. This argument is ignored in this implementation.

Returns:List<HostInfo>

the hosts list from this connection URL, filtered for the given view.

getHostsListFromDnsSrvback to summary
public List<HostInfo> getHostsListFromDnsSrv(HostInfo srvHost)

Returns a hosts list built from the result of the DNS SRV lookup for the original host name.

Parameters
srvHost:HostInfo

the HostInfo from where to get the DNS SRV service name to lookup.

Returns:List<HostInfo>

the hosts list from the result of the DNS SRV lookup, filtered for the given view.

getMainHostback to summary
public HostInfo getMainHost()

Returns the single or first host info structure.

Returns:HostInfo

the first host info structure

getOriginalPropertiesback to summary
public Map<String, String> getOriginalProperties()

Returns the original (common to all hosts) connection arguments as provided in the connection string query section.

Returns:Map<String, String>

the original (common to all hosts) connection arguments

getPropertiesFromConfigFilesback to summary
public static Properties getPropertiesFromConfigFiles(String configFiles)

Returns a map containing the properties read from the given configuration files. Multiple files can be referenced using a comma as separator.

Parameters
configFiles:String

the list of the configuration files to read

Returns:Properties

the map containing all the properties read

getTypeback to summary
public ConnectionUrl.Type getType()

Returns this connection URL type.

Returns:ConnectionUrl.Type

the connection URL type

hostsCountback to summary
public int hostsCount()

Returns the number of hosts in this connection URL.

Returns:int

the number of hosts

injectPerTypePropertiesback to summary
protected void injectPerTypeProperties(Map<String, String> props)

Subclasses must override this method if they need to inject additional properties in the connection arguments map while it's being constructed.

Parameters
props:Map<String, String>

the properties already containing all known connection arguments

preprocessPerTypeHostPropertiesback to summary
protected void preprocessPerTypeHostProperties(Map<String, String> hostProps)

Subclasses should override this to perform any required pre-processing on the host information properties.

Parameters
hostProps:Map<String, String>

the host properties map to process

replaceLegacyPropertyValuesback to summary
protected void replaceLegacyPropertyValues(Map<String, String> props)

Some acceptable property values have changed in c/J 8.0 but old values remain hard-coded in widely used software. So, old values must be accepted and translated to new ones.

Parameters
props:Map<String, String>

the host properties map to fix

setupPropertiesTransformerback to summary
protected void setupPropertiesTransformer()

Sets up the ConnectionPropertiesTransform if one was provided.

srvRecordsToHostsListback to summary
private List<HostInfo> srvRecordsToHostsList(List<DnsSrv.SrvRecord> srvRecords, HostInfo baseHostInfo)

Converts a list of DNS SRV records into a hosts list.

Parameters
srvRecords:List<DnsSrv.SrvRecord>

the list of DNS SRV records.

baseHostInfo:HostInfo

the HostInfo to use as source of all common host specific options.

Returns:List<HostInfo>

a list of hosts.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this object.

Returns:String

a string representation of this object

Annotations
@Override
com.mysql.cj.conf back to summary

public sealed Enum ConnectionUrl.HostsCardinality

extends Enum<ConnectionUrl.HostsCardinality>
Class Inheritance

The rules describing the number of hosts a database URL may contain.

Field Summary

Modifier and TypeField and Description
public static final ConnectionUrl.HostsCardinality
public static final ConnectionUrl.HostsCardinality
public static final ConnectionUrl.HostsCardinality

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract boolean
assertSize(int n)

public static ConnectionUrl.HostsCardinality
public static ConnectionUrl.HostsCardinality[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

MULTIPLEback to summary
public static final ConnectionUrl.HostsCardinality MULTIPLE
ONE_OR_MOREback to summary
public static final ConnectionUrl.HostsCardinality ONE_OR_MORE
SINGLEback to summary
public static final ConnectionUrl.HostsCardinality SINGLE

Constructor Detail

HostsCardinalityback to summary
private HostsCardinality()

Method Detail

assertSizeback to summary
public abstract boolean assertSize(int n)
valueOfback to summary
public static ConnectionUrl.HostsCardinality valueOf(String name)
valuesback to summary
public static ConnectionUrl.HostsCardinality[] values()
com.mysql.cj.conf back to summary

public final Enum ConnectionUrl.Type

extends Enum<ConnectionUrl.Type>
Class Inheritance

The database URL type which is determined by the scheme section of the connection string.

Field Summary

Modifier and TypeField and Description
private ConnectionUrl.Type
private ConnectionUrl.HostsCardinality
private PropertyKey
public static final ConnectionUrl.Type
public static final ConnectionUrl.Type
private String
public static final ConnectionUrl.Type
public static final ConnectionUrl.Type
public static final ConnectionUrl.Type
public static final ConnectionUrl.Type
private String
public static final ConnectionUrl.Type
public static final ConnectionUrl.Type
public static final ConnectionUrl.Type

Constructor Summary

AccessConstructor and Description
private
Type(String scheme, ConnectionUrl.HostsCardinality cardinality, String implementingClass)

private
Type(String scheme, ConnectionUrl.HostsCardinality cardinality, String implementingClass, PropertyKey dnsSrvPropertyKey, ConnectionUrl.Type alternateDnsSrvType)

Method Summary

Modifier and TypeMethod and Description
public static ConnectionUrl.Type

Returns:

the Type corresponding to the given protocol and number of hosts
fromValue
(String
one of supported schemes
scheme
,
int
the number of hosts in the database URL
n
)

Returns the Type corresponding to the given scheme and number of hosts, if any.

public ConnectionUrl.Type
public ConnectionUrl.HostsCardinality
public static ConnectionUrl

Returns:

an instance of ConnectionUrl.
getConnectionUrlInstance
(ConnectionUrlParser
the ConnectionUrlParser containing the URL components.
parser
,
Properties
a connection properties map to add to the ConnectionUrl structure.
info
)

Instantiates a class that implements the right type of connection URLs for the given ConnectionUrlParser.

public PropertyKey
public String
private ConnectionUrl

Returns:

an instance of ConnectionUrl.
getImplementingInstance
(ConnectionUrlParser
the ConnectionUrlParser containing the URL components.
parser
,
Properties
a connection properties map to add to the ConnectionUrl structure.
info
)

Instantiates a class that implements this type of connection URLs with the given arguments.

public String
public static boolean

Returns:

true if the given scheme is supported by driver
isSupported
(String
scheme part from connection string, like "jdbc:mysql:"
scheme
)

Checks if the given scheme corresponds to one of the connection types the driver supports.

public static ConnectionUrl.Type
public static ConnectionUrl.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

alternateDnsSrvTypeback to summary
private ConnectionUrl.Type alternateDnsSrvType
cardinalityback to summary
private ConnectionUrl.HostsCardinality cardinality
dnsSrvPropertyKeyback to summary
private PropertyKey dnsSrvPropertyKey
FAILOVER_CONNECTIONback to summary
public static final ConnectionUrl.Type FAILOVER_CONNECTION
FAILOVER_DNS_SRV_CONNECTIONback to summary
public static final ConnectionUrl.Type FAILOVER_DNS_SRV_CONNECTION
implementingClassback to summary
private String implementingClass
LOADBALANCE_CONNECTIONback to summary
public static final ConnectionUrl.Type LOADBALANCE_CONNECTION
LOADBALANCE_DNS_SRV_CONNECTIONback to summary
public static final ConnectionUrl.Type LOADBALANCE_DNS_SRV_CONNECTION
REPLICATION_CONNECTIONback to summary
public static final ConnectionUrl.Type REPLICATION_CONNECTION
REPLICATION_DNS_SRV_CONNECTIONback to summary
public static final ConnectionUrl.Type REPLICATION_DNS_SRV_CONNECTION
schemeback to summary
private String scheme
SINGLE_CONNECTIONback to summary
public static final ConnectionUrl.Type SINGLE_CONNECTION
XDEVAPI_DNS_SRV_SESSIONback to summary
public static final ConnectionUrl.Type XDEVAPI_DNS_SRV_SESSION
XDEVAPI_SESSIONback to summary
public static final ConnectionUrl.Type XDEVAPI_SESSION

Constructor Detail

Typeback to summary
private Type(String scheme, ConnectionUrl.HostsCardinality cardinality, String implementingClass)
Typeback to summary
private Type(String scheme, ConnectionUrl.HostsCardinality cardinality, String implementingClass, PropertyKey dnsSrvPropertyKey, ConnectionUrl.Type alternateDnsSrvType)

Method Detail

fromValueback to summary
public static ConnectionUrl.Type fromValue(String scheme, int n)

Returns the Type corresponding to the given scheme and number of hosts, if any. Otherwise throws an UnsupportedConnectionStringException. Calling this method with the argument n lower than 0 skips the hosts cardinality validation.

Parameters
scheme:String

one of supported schemes

n:int

the number of hosts in the database URL

Returns:ConnectionUrl.Type

the Type corresponding to the given protocol and number of hosts

getAlternateDnsSrvTypeback to summary
public ConnectionUrl.Type getAlternateDnsSrvType()
getCardinalityback to summary
public ConnectionUrl.HostsCardinality getCardinality()
getConnectionUrlInstanceback to summary
public static ConnectionUrl getConnectionUrlInstance(ConnectionUrlParser parser, Properties info)

Instantiates a class that implements the right type of connection URLs for the given ConnectionUrlParser.

Parameters
parser:ConnectionUrlParser

the ConnectionUrlParser containing the URL components.

info:Properties

a connection properties map to add to the ConnectionUrl structure.

Returns:ConnectionUrl

an instance of ConnectionUrl.

getDnsSrvPropertyKeyback to summary
public PropertyKey getDnsSrvPropertyKey()
getImplementingClassback to summary
public String getImplementingClass()
getImplementingInstanceback to summary
private ConnectionUrl getImplementingInstance(ConnectionUrlParser parser, Properties info)

Instantiates a class that implements this type of connection URLs with the given arguments.

Parameters
parser:ConnectionUrlParser

the ConnectionUrlParser containing the URL components.

info:Properties

a connection properties map to add to the ConnectionUrl structure.

Returns:ConnectionUrl

an instance of ConnectionUrl.

getSchemeback to summary
public String getScheme()
isSupportedback to summary
public static boolean isSupported(String scheme)

Checks if the given scheme corresponds to one of the connection types the driver supports.

Parameters
scheme:String

scheme part from connection string, like "jdbc:mysql:"

Returns:boolean

true if the given scheme is supported by driver

valueOfback to summary
public static ConnectionUrl.Type valueOf(String name)
valuesback to summary
public static ConnectionUrl.Type[] values()