|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jtds.jdbcx.PooledConnection
jTDS implementation of the PooledConnection
interface.
Field Summary | |
protected java.sql.Connection |
connection
|
private java.util.ArrayList |
listeners
|
Constructor Summary | |
PooledConnection(java.sql.Connection connection)
|
Method Summary | |
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener)
Adds the specified listener to the list. |
void |
close()
Closes the database connection. |
void |
fireConnectionEvent(boolean closed,
java.sql.SQLException sqlException)
Fires a new connection event on all listeners. |
java.sql.Connection |
getConnection()
Returns a ConnectionProxy. |
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
Removes the specified listener from the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.ArrayList listeners
protected java.sql.Connection connection
Constructor Detail |
public PooledConnection(java.sql.Connection connection)
Method Detail |
public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.sql.PooledConnection
fireConnectionEvent(boolean, java.sql.SQLException)
,
removeConnectionEventListener(javax.sql.ConnectionEventListener)
public void close() throws java.sql.SQLException
close
in interface javax.sql.PooledConnection
java.sql.SQLException
- if an error occurspublic void fireConnectionEvent(boolean closed, java.sql.SQLException sqlException)
closed
- true
if close
has been called on the
connection; false
if the sqlException
represents
an error where the connection may not longer be used.sqlException
- the SQLException to pass to the listenerspublic java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.PooledConnection
java.sql.SQLException
- if an error occurspublic void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.sql.PooledConnection
addConnectionEventListener(javax.sql.ConnectionEventListener)
,
fireConnectionEvent(boolean, java.sql.SQLException)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |