|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.config.BaseConnectionFactory
public abstract class BaseConnectionFactory
C3P0ConnectionFactory class.
| Constructor Summary | |
|---|---|
protected |
BaseConnectionFactory(InputStream stream,
String dsName)
|
protected |
BaseConnectionFactory(String configFile,
String dsName)
|
| Method Summary | ||
|---|---|---|
void |
close()
close |
|
abstract Connection |
getConnection()
getConnection |
|
abstract Connection |
getConnection(String username,
String password)
|
|
abstract DataSource |
getDataSource()
getDataSource |
|
abstract int |
getLoginTimeout()
getLoginTimeout |
|
abstract PrintWriter |
getLogWriter()
getLogWriter |
|
abstract String |
getUrl()
getUrl |
|
abstract String |
getUser()
getUser |
|
protected abstract void |
initializePool(JdbcDataSource ds)
|
|
boolean |
isWrapperFor(Class<?> iface)
isWrapperFor |
|
abstract void |
setLoginTimeout(int seconds)
How long, in seconds, to attempt to make a connection to the database. |
|
abstract void |
setLogWriter(PrintWriter out)
|
|
abstract void |
setUrl(String url)
setUrl |
|
abstract void |
setUser(String user)
setUser |
|
|
unwrap(Class<T> iface)
unwrap |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opennms.netmgt.config.ClosableDataSource |
|---|
setIdleTimeout, setMaxPool, setMaxSize, setMinPool |
| Constructor Detail |
|---|
protected BaseConnectionFactory(InputStream stream,
String dsName)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
PropertyVetoException,
SQLException
stream - A configuration file as an InputStream.dsName - The data source's name.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
PropertyVetoException - if any.
SQLException - if any.
protected BaseConnectionFactory(String configFile,
String dsName)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
PropertyVetoException,
SQLException
configFile - A configuration file name.dsName - The data source's name.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
PropertyVetoException - if any.
SQLException - if any.| Method Detail |
|---|
protected abstract void initializePool(JdbcDataSource ds)
throws SQLException
SQLException
public abstract Connection getConnection()
throws SQLException
getConnection
getConnection in interface DataSourceConnection object.
SQLException - if any.public abstract String getUrl()
getUrl
String object.public abstract void setUrl(String url)
setUrl
url - a String object.public abstract String getUser()
getUser
String object.public abstract void setUser(String user)
setUser
user - a String object.public abstract DataSource getDataSource()
getDataSource
DataSource object.
public abstract Connection getConnection(String username,
String password)
throws SQLException
getConnection in interface DataSourceSQLException
public abstract PrintWriter getLogWriter()
throws SQLException
getLogWriter
getLogWriter in interface CommonDataSourcePrintWriter object.
SQLException - if any.
public abstract void setLogWriter(PrintWriter out)
throws SQLException
setLogWriter in interface CommonDataSourceSQLException
public abstract void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourcesetLoginTimeout in interface ClosableDataSourceSQLException
public abstract int getLoginTimeout()
throws SQLException
getLoginTimeout
getLoginTimeout in interface CommonDataSourceSQLException - if any.
public void close()
throws SQLException
close
close in interface ClosableDataSourceSQLException - if any.
public <T> T unwrap(Class<T> iface)
throws SQLException
unwrap
unwrap in interface WrapperT - a T object.iface - a Class object.
SQLException - if any.
public boolean isWrapperFor(Class<?> iface)
throws SQLException
isWrapperFor
isWrapperFor in interface Wrapperiface - a Class object.
SQLException - if any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||