|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmonit.support.jdbc.MonitoredDataSource
public class MonitoredDataSource
DataSource wrapper that adds monitoring on JDBC connexions.
Constructor Summary | |
---|---|
MonitoredDataSource()
|
|
MonitoredDataSource(javax.sql.DataSource dataSource)
Constructor |
Method Summary | ||
---|---|---|
java.sql.Connection |
getConnection()
|
|
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
|
|
int |
getLoginTimeout()
|
|
java.io.PrintWriter |
getLogWriter()
|
|
javax.sql.DataSource |
init()
Init |
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
|
boolean |
isWrapperFor(java.lang.Class<?> iface)
|
|
void |
setDataSource(javax.sql.DataSource dataSource)
|
|
void |
setDataSourceName(java.lang.String dataSourceName)
|
|
void |
setLoginTimeout(int seconds)
|
|
void |
setLogWriter(java.io.PrintWriter out)
|
|
void |
setMonitor(Monitor monitor)
|
|
|
unwrap(java.lang.Class<T> iface)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MonitoredDataSource(javax.sql.DataSource dataSource)
dataSource
- the datasource to monitorpublic MonitoredDataSource()
Method Detail |
---|
public void setDataSource(javax.sql.DataSource dataSource)
dataSource
- the dataSource to setpublic void setDataSourceName(java.lang.String dataSourceName)
dataSourceName
- the dataSourceName to setpublic void setMonitor(Monitor monitor)
monitor
- the monitor to setpublic javax.sql.DataSource init()
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
DataSource.getConnection()
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
DataSource.getConnection(java.lang.String,
java.lang.String)
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
java.lang.Throwable
InvocationHandler.invoke(java.lang.Object,
java.lang.reflect.Method, java.lang.Object[])
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
CommonDataSource.getLoginTimeout()
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
CommonDataSource.getLogWriter()
public void setLoginTimeout(int seconds) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
CommonDataSource.setLoginTimeout(int)
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
setLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
CommonDataSource.setLogWriter(java.io.PrintWriter)
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |