public class ClientDriver
extends java.lang.Object
implements java.sql.Driver
| Modifier and Type | Field and Description |
|---|---|
private static int |
DERBY_REMOTE_PROTOCOL |
private static java.sql.SQLException |
exceptionsOnLoadDriver__ |
private static ClientJDBCObjectFactory |
factoryObject |
private static ClientDriver |
registeredDriver__ |
private int |
traceFileSuffixIndex_ |
| Constructor and Description |
|---|
ClientDriver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsURL(java.lang.String url) |
private java.lang.String |
appendDatabaseAttributes(java.lang.String database,
java.util.Properties augmentedProperties)
Append attributes to the database name except for user/password
which are sent as part of the protocol, and SSL which is used
locally in the client.
|
private void |
checkURLNotNull(java.lang.String url) |
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties properties) |
private static ClientJDBCObjectFactory |
createDefaultFactoryImpl()
Returns an instance of the ClientJDBCObjectFactoryImpl class
|
private static ClientJDBCObjectFactory |
createJDBC40FactoryImpl()
Returns an instance of the ClientJDBCObjectFactoryImpl40 class
If a ClassNotFoundException occurs then it returns an
instance of ClientJDBCObjectFactoryImpl
If a future version of JDBC comes then
a similar method would be added say createJDBCXXFactoryImpl
in which if the class is not found then it would
return the lower version thus having a sort of cascading effect
until it gets a valid instance
|
private static ClientJDBCObjectFactory |
createJDBC42FactoryImpl()
Returns an instance of the ClientJDBCObjectFactoryImpl42 class
If a ClassNotFoundException occurs then it returns an
instance of the most refined ClientJDBCObjectFactoryImpl possible
If a future version of JDBC comes then
a similar method would be added say createJDBCXXFactoryImpl
in which if the class is not found then it would
return the lower version thus having a sort of cascading effect
until it gets a valid instance
|
static ClientJDBCObjectFactory |
getFactory()
This method returns an Implementation
of ClientJDBCObjectFactory depending on
VM under use
Currently it returns either
ClientJDBCObjectFactoryImpl
(or)
ClientJDBCObjectFactoryImpl40
|
int |
getMajorVersion() |
int |
getMinorVersion() |
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties properties) |
boolean |
jdbcCompliant() |
protected static void |
registerMe(ClientDriver me) |
private static java.lang.String |
tokenizeDatabase(java.util.StringTokenizer urlTokenizer,
java.lang.String url) |
private static int |
tokenizeOptionalPortNumber(java.util.StringTokenizer urlTokenizer,
java.lang.String url) |
private static int |
tokenizeProtocol(java.lang.String url,
java.util.StringTokenizer urlTokenizer) |
private static java.lang.String |
tokenizeServerName(java.util.StringTokenizer urlTokenizer,
java.lang.String url) |
private static java.util.Properties |
tokenizeURLProperties(java.lang.String url,
java.util.Properties properties) |
private transient int traceFileSuffixIndex_
private static final int DERBY_REMOTE_PROTOCOL
private static ClientJDBCObjectFactory factoryObject
private static java.sql.SQLException exceptionsOnLoadDriver__
private static ClientDriver registeredDriver__
protected static void registerMe(ClientDriver me)
public java.sql.Connection connect(java.lang.String url,
java.util.Properties properties)
throws java.sql.SQLException
connect in interface java.sql.Driverjava.sql.SQLExceptionprivate java.lang.String appendDatabaseAttributes(java.lang.String database,
java.util.Properties augmentedProperties)
database - - Short database nameaugmentedProperties - - Set of properties to append as attributespublic boolean acceptsURL(java.lang.String url)
throws java.sql.SQLException
acceptsURL in interface java.sql.Driverjava.sql.SQLExceptionprivate void checkURLNotNull(java.lang.String url)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
java.util.Properties properties)
throws java.sql.SQLException
getPropertyInfo in interface java.sql.Driverjava.sql.SQLExceptionpublic int getMajorVersion()
getMajorVersion in interface java.sql.Driverpublic int getMinorVersion()
getMinorVersion in interface java.sql.Driverpublic boolean jdbcCompliant()
jdbcCompliant in interface java.sql.Driverprivate static int tokenizeProtocol(java.lang.String url,
java.util.StringTokenizer urlTokenizer)
throws SqlException
SqlExceptionprivate static java.lang.String tokenizeServerName(java.util.StringTokenizer urlTokenizer,
java.lang.String url)
throws SqlException
SqlExceptionprivate static int tokenizeOptionalPortNumber(java.util.StringTokenizer urlTokenizer,
java.lang.String url)
throws SqlException
SqlExceptionprivate static java.lang.String tokenizeDatabase(java.util.StringTokenizer urlTokenizer,
java.lang.String url)
throws SqlException
SqlExceptionprivate static java.util.Properties tokenizeURLProperties(java.lang.String url,
java.util.Properties properties)
throws SqlException
SqlExceptionpublic static ClientJDBCObjectFactory getFactory()
private static ClientJDBCObjectFactory createDefaultFactoryImpl()
private static ClientJDBCObjectFactory createJDBC40FactoryImpl()
private static ClientJDBCObjectFactory createJDBC42FactoryImpl()
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.