Class ClientDriver
java.lang.Object
org.apache.derby.jdbc.ClientDriver
- All Implemented Interfaces:
Driver
- Direct Known Subclasses:
ClientDriver40
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static SQLExceptionprivate static ClientJDBCObjectFactoryprivate static ClientDriverprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsURL(String url) private StringappendDatabaseAttributes(String database, 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 voidcheckURLNotNull(String url) connect(String url, Properties properties) private static ClientJDBCObjectFactoryReturns an instance of the ClientJDBCObjectFactoryImpl classprivate static ClientJDBCObjectFactoryReturns 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 instanceprivate static ClientJDBCObjectFactoryReturns 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 instancestatic ClientJDBCObjectFactoryThis method returns an Implementation of ClientJDBCObjectFactory depending on VM under use Currently it returns either ClientJDBCObjectFactoryImpl (or) ClientJDBCObjectFactoryImpl42intint/////////////////////////////////////////////////////////////////getPropertyInfo(String url, Properties properties) booleanprotected static voidprivate static StringtokenizeDatabase(StringTokenizer urlTokenizer, String url) private static inttokenizeOptionalPortNumber(StringTokenizer urlTokenizer, String url) private static inttokenizeProtocol(String url, StringTokenizer urlTokenizer) private static StringtokenizeServerName(StringTokenizer urlTokenizer, String url) private static PropertiestokenizeURLProperties(String url, Properties properties)
-
Field Details
-
traceFileSuffixIndex_
private transient int traceFileSuffixIndex_ -
DERBY_REMOTE_PROTOCOL
private static final int DERBY_REMOTE_PROTOCOL- See Also:
-
factoryObject
-
exceptionsOnLoadDriver__
-
registeredDriver__
-
-
Constructor Details
-
ClientDriver
public ClientDriver()
-
-
Method Details
-
registerMe
-
connect
- Specified by:
connectin interfaceDriver- Throws:
SQLException
-
appendDatabaseAttributes
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. Other attributes will be sent to the server with the database name Assumes augmentedProperties is not null- Parameters:
database- - Short database nameaugmentedProperties- - Set of properties to append as attributes- Returns:
- databaseName + attributes (e.g. mydb;create=true)
-
acceptsURL
- Specified by:
acceptsURLin interfaceDriver- Throws:
SQLException
-
checkURLNotNull
- Throws:
SQLException
-
getPropertyInfo
- Specified by:
getPropertyInfoin interfaceDriver- Throws:
SQLException
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersionin interfaceDriver
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersionin interfaceDriver
-
jdbcCompliant
public boolean jdbcCompliant()- Specified by:
jdbcCompliantin interfaceDriver
-
getParentLogger
/////////////////////////////////////////////////////////////////- Specified by:
getParentLoggerin interfaceDriver- Throws:
SQLFeatureNotSupportedException
-
tokenizeProtocol
- Throws:
SqlException
-
tokenizeServerName
private static String tokenizeServerName(StringTokenizer urlTokenizer, String url) throws SqlException - Throws:
SqlException
-
tokenizeOptionalPortNumber
private static int tokenizeOptionalPortNumber(StringTokenizer urlTokenizer, String url) throws SqlException - Throws:
SqlException
-
tokenizeDatabase
private static String tokenizeDatabase(StringTokenizer urlTokenizer, String url) throws SqlException - Throws:
SqlException
-
tokenizeURLProperties
private static Properties tokenizeURLProperties(String url, Properties properties) throws SqlException - Throws:
SqlException
-
getFactory
This method returns an Implementation of ClientJDBCObjectFactory depending on VM under use Currently it returns either ClientJDBCObjectFactoryImpl (or) ClientJDBCObjectFactoryImpl42 -
createDefaultFactoryImpl
Returns an instance of the ClientJDBCObjectFactoryImpl class -
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 -
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
-