Class DelegatingDriver
- java.lang.Object
-
- com.vividsolutions.jump.datastore.jdbc.DelegatingDriver
-
- All Implemented Interfaces:
Driver
public class DelegatingDriver extends Object implements Driver
a jdbc driver wrapper to allow loading the driver with custon classloader from an arbitrary location during runtime. DatabaseManager.registerDriver() only registers drivers loaded with the system classloader so we trick it into accepting our driver by wrapping it into this one.
-
-
Constructor Summary
Constructors Constructor Description DelegatingDriver(Driver driver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsURL(String url)Connectionconnect(String url, Properties info)DrivergetDriver()get wrappeeintgetMajorVersion()intgetMinorVersion()LoggergetParentLogger()DriverPropertyInfo[]getPropertyInfo(String url, Properties info)booleanjdbcCompliant()StringtoString()
-
-
-
Constructor Detail
-
DelegatingDriver
public DelegatingDriver(Driver driver)
-
-
Method Detail
-
connect
public Connection connect(String url, Properties info) throws SQLException
- Specified by:
connectin interfaceDriver- Throws:
SQLException
-
acceptsURL
public boolean acceptsURL(String url) throws SQLException
- Specified by:
acceptsURLin interfaceDriver- Throws:
SQLException
-
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
- 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
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceDriver- Throws:
SQLFeatureNotSupportedException
-
getDriver
public Driver getDriver()
get wrappee- Returns:
- the Driver
-
-