|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.monitor.db.ProxyDriver
public class ProxyDriver
This JDBC driver acts like a proxy between PatternTesting and the real JDBC driver to be able to monitor JDBC access. It was inspired by the JAMonDriver of the JAMon framework.
This driver is registered for JDBC URLs beginning with "jdbc:proxy: ...". This prefix must follow the real driver path. E.g. if you want to use HSQL as database your URL make look like "jdbc:proxy:hsqldb:file:/tmp/oli".
| Constructor Summary | |
|---|---|
ProxyDriver()
|
|
| 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()
Gets the major version |
int |
getMinorVersion()
Gets the minor version. |
Logger |
getParentLogger()
Gets the parent logger. |
DriverPropertyInfo[] |
getPropertyInfo(String url,
Properties info)
Gets the property info. |
static Driver |
getRealDriver(String jdbcURL)
Gets the real driver. |
static String |
getRealDriverName(String jdbcURL)
Gets the real driver name of the underlying driver. |
static String |
getRealURL(String jdbcURL)
Gets the real JDBC URL of the underlying driver. |
boolean |
jdbcCompliant()
Jdbc compliant. |
static void |
register()
Registers the driver as JDBC driver. |
String |
toString()
Better toString implementation which supports logging and debugging. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProxyDriver()
| Method Detail |
|---|
public static void register()
public static String getRealURL(String jdbcURL)
jdbcURL - the jdbc url, e.g. "jdbc:proxy:hsqldb:mem:testdb"
public static String getRealDriverName(String jdbcURL)
jdbcURL - the jdbc url, e.g. "jdbc:proxy:hsqldb:mem:testdb"
public static Driver getRealDriver(String jdbcURL)
jdbcURL - the jdbc url, e.g. "jdbc:proxy:hsqldb:mem:testdb"
public boolean acceptsURL(String url)
acceptsURL in interface Driverurl - the JDBC URL
Driver.acceptsURL(String)
public Connection connect(String url,
Properties info)
throws SQLException
connect in interface Driverurl - the urlinfo - the info (e.g. user/password)
SQLException - the sQL exceptionDriver.connect(String, Properties)public int getMajorVersion()
getMajorVersion in interface Driverpublic int getMinorVersion()
getMinorVersion in interface Driver
public DriverPropertyInfo[] getPropertyInfo(String url,
Properties info)
throws SQLException
getPropertyInfo in interface Driverurl - the urlinfo - the info
SQLException - the SQL exceptionpublic boolean jdbcCompliant()
jdbcCompliant in interface Driver
public Logger getParentLogger()
throws SQLFeatureNotSupportedException
SQLFeatureNotSupportedException - the SQL feature not supported exceptionpublic String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||