jdbc2http driver

com.satline.jdbc.http
Class Jdbc2HttpDriver

java.lang.Object
  extended by com.satline.jdbc.http.Jdbc2HttpDriver
All Implemented Interfaces:
Driver

public class Jdbc2HttpDriver
extends Object
implements Driver

Here is the implementation of the interface java.sql.Driver for this JDBC driver.

Author:
Tomas Teubner

Constructor Summary
Jdbc2HttpDriver()
          Default constructor.
 
Method Summary
 boolean acceptsURL(String url)
          Retrieves whether the driver thinks that it can open a connection to the given URL.
 Connection connect(String url, Properties info)
          Attempts to make a database connection to the given URL.
 int getMajorVersion()
          Retrieves the driver's major version number.
 int getMinorVersion()
          Gets the driver's minor version number.
 DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
          Gets information about the possible properties for this driver.
 boolean jdbcCompliant()
          Reports whether this driver is a genuine JDBC CompliantTM driver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jdbc2HttpDriver

public Jdbc2HttpDriver()
Default constructor.

Throws:
SQLException - if driver registration fails.
Method Detail

connect

public Connection connect(String url,
                          Properties info)
                   throws SQLException
Attempts to make a database connection to the given URL. The driver returns "null" if it realizes it is the wrong kind of driver to connect to the given URL. The driver throws an SQLException if it is the right driver to connect to the given URL but has trouble connecting to the database. The java.util.Properties argument is used to pass arbitrary string tag/value pairs as connection arguments. Normally at least "user" and "password" properties should be included in the Properties object.

Specified by:
connect in interface Driver
Throws:
SQLException

acceptsURL

public boolean acceptsURL(String url)
                   throws SQLException
Retrieves whether the driver thinks that it can open a connection to the given URL. The driver will return true if it understands the subprotocol specified in the URL and false if it does not.

Specified by:
acceptsURL in interface Driver
Throws:
SQLException

getPropertyInfo

public DriverPropertyInfo[] getPropertyInfo(String url,
                                            Properties info)
                                     throws SQLException
Gets information about the possible properties for this driver. The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database. Note that depending on the values the human has supplied so far, additional values may become necessary, so it may be necessary to iterate though several calls to the getPropertyInfo method.

Specified by:
getPropertyInfo in interface Driver
Throws:
SQLException

getMajorVersion

public int getMajorVersion()
Retrieves the driver's major version number.

Specified by:
getMajorVersion in interface Driver

getMinorVersion

public int getMinorVersion()
Gets the driver's minor version number.

Specified by:
getMinorVersion in interface Driver

jdbcCompliant

public boolean jdbcCompliant()
Reports whether this driver is a genuine JDBC CompliantTM driver. Returns true.

Specified by:
jdbcCompliant in interface Driver

jdbc2http driver

Copyright © 2006-2008 Tomas Teubner. All Rights Reserved.