net.bull.javamelody
Class JdbcDriver

java.lang.Object
  extended by net.bull.javamelody.JdbcDriver
All Implemented Interfaces:
Driver

public class JdbcDriver
extends Object
implements Driver

Driver jdbc "proxy" pour le monitoring. C'est la classe de ce driver qui doit être déclarée si un driver jdbc et non une dataSource est utilisé. Dans la déclaration une propriété jdbc 'driver' doit contenir le nom de la classe du vrai driver. D'autres propriétés jdbc comme url, username ou password peuvent être déclarées.

Author:
Emeric Vernat

Constructor Summary
JdbcDriver()
           
 
Method Summary
 boolean acceptsURL(String url)
          
 Connection connect(String url, Properties info)
          
 int getMajorVersion()
          
 int getMinorVersion()
          
 Logger getParentLogger()
          Définition de la méthode getParentLogger ajoutée dans l'interface Driver en jdk 1.7.
 DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
          
 boolean jdbcCompliant()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JdbcDriver

public JdbcDriver()
Method Detail

connect

public Connection connect(String url,
                          Properties info)
                   throws SQLException

Specified by:
connect in interface Driver
Throws:
SQLException

acceptsURL

public boolean acceptsURL(String url)
                   throws SQLException

Specified by:
acceptsURL in interface Driver
Throws:
SQLException

getMajorVersion

public int getMajorVersion()

Specified by:
getMajorVersion in interface Driver

getMinorVersion

public int getMinorVersion()

Specified by:
getMinorVersion in interface Driver

getPropertyInfo

public DriverPropertyInfo[] getPropertyInfo(String url,
                                            Properties info)
                                     throws SQLException

Specified by:
getPropertyInfo in interface Driver
Throws:
SQLException

jdbcCompliant

public boolean jdbcCompliant()

Specified by:
jdbcCompliant in interface Driver

toString

public String toString()

Overrides:
toString in class Object

getParentLogger

public Logger getParentLogger()
                       throws SQLFeatureNotSupportedException
Définition de la méthode getParentLogger ajoutée dans l'interface Driver en jdk 1.7.

Returns:
Logger
Throws:
SQLFeatureNotSupportedException - e


Copyright © 2008-2011 Emeric Vernat. All Rights Reserved.