Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.jdbc
Class ClientDriver  view ClientDriver download ClientDriver.java

java.lang.Object
  extended byorg.apache.derby.jdbc.ClientDriver
All Implemented Interfaces:
java.sql.Driver

public class ClientDriver
extends java.lang.Object
implements java.sql.Driver


Field Summary
private static int DERBY_REMOTE_PROTOCOL
           
private static org.apache.derby.client.am.SqlException exceptionsOnLoadDriver__
           
private static ClientDriver registeredDriver__
           
private  int traceFileSuffixIndex_
           
 
Constructor Summary
ClientDriver()
           
 
Method Summary
 boolean acceptsURL(java.lang.String url)
          This method tests whether or not the driver believes it can connect to the specified database.
 java.sql.Connection connect(java.lang.String url, java.util.Properties properties)
          This method connects to the specified database using the connection properties supplied.
 int getMajorVersion()
          This method returns the major version number of the driver.
 int getMinorVersion()
          This method returns the minor version number of the driver.
 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties properties)
          This method returns an array of possible properties that could be used to connect to the specified database.
 boolean jdbcCompliant()
          This method tests whether or not the driver is JDBC compliant.
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

traceFileSuffixIndex_

private transient int traceFileSuffixIndex_

DERBY_REMOTE_PROTOCOL

private static final int DERBY_REMOTE_PROTOCOL
See Also:
Constant Field Values

exceptionsOnLoadDriver__

private static org.apache.derby.client.am.SqlException exceptionsOnLoadDriver__

registeredDriver__

private static ClientDriver registeredDriver__
Constructor Detail

ClientDriver

public ClientDriver()
Method Detail

connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties properties)
                            throws java.sql.SQLException
Description copied from interface: java.sql.Driver
This method connects to the specified database using the connection properties supplied. If the driver does not understand the database URL, it should return null instead of throwing an exception since the DriverManager will probe a driver in this manner.

Specified by:
connect in interface java.sql.Driver

acceptsURL

public boolean acceptsURL(java.lang.String url)
                   throws java.sql.SQLException
Description copied from interface: java.sql.Driver
This method tests whether or not the driver believes it can connect to the specified database. The driver should only test whether it understands and accepts the URL. It should not necessarily attempt to probe the database for a connection.

Specified by:
acceptsURL in interface java.sql.Driver

getPropertyInfo

public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                                     java.util.Properties properties)
                                              throws java.sql.SQLException
Description copied from interface: java.sql.Driver
This method returns an array of possible properties that could be used to connect to the specified database.

Specified by:
getPropertyInfo in interface java.sql.Driver

getMajorVersion

public int getMajorVersion()
Description copied from interface: java.sql.Driver
This method returns the major version number of the driver.

Specified by:
getMajorVersion in interface java.sql.Driver

getMinorVersion

public int getMinorVersion()
Description copied from interface: java.sql.Driver
This method returns the minor version number of the driver.

Specified by:
getMinorVersion in interface java.sql.Driver

jdbcCompliant

public boolean jdbcCompliant()
Description copied from interface: java.sql.Driver
This method tests whether or not the driver is JDBC compliant. This method should only return true if the driver has been certified as JDBC compliant.

Specified by:
jdbcCompliant in interface java.sql.Driver

tokenizeProtocol

private static int tokenizeProtocol(java.lang.String url,
                                    java.util.StringTokenizer urlTokenizer)
                             throws org.apache.derby.client.am.SqlException

tokenizeServerName

private static java.lang.String tokenizeServerName(java.util.StringTokenizer urlTokenizer,
                                                   java.lang.String url)
                                            throws org.apache.derby.client.am.SqlException

tokenizeOptionalPortNumber

private static int tokenizeOptionalPortNumber(java.util.StringTokenizer urlTokenizer,
                                              java.lang.String url)
                                       throws org.apache.derby.client.am.SqlException

tokenizeDatabase

private static java.lang.String tokenizeDatabase(java.util.StringTokenizer urlTokenizer,
                                                 java.lang.String url)
                                          throws org.apache.derby.client.am.SqlException

tokenizeURLProperties

private static java.util.Properties tokenizeURLProperties(java.lang.String url,
                                                          java.util.Properties properties)
                                                   throws org.apache.derby.client.am.SqlException