|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jtds.jdbcx.PooledConnection
public class 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 |
addStatementEventListener(javax.sql.StatementEventListener listener)
|
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. |
void |
removeStatementEventListener(javax.sql.StatementEventListener listener)
|
| 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.PooledConnectionfireConnectionEvent(boolean, java.sql.SQLException),
removeConnectionEventListener(javax.sql.ConnectionEventListener)
public void close()
throws java.sql.SQLException
close in interface javax.sql.PooledConnectionjava.sql.SQLException - if an error occurs
public 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 listeners
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.PooledConnectionjava.sql.SQLException - if an error occurspublic void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener in interface javax.sql.PooledConnectionaddConnectionEventListener(javax.sql.ConnectionEventListener),
fireConnectionEvent(boolean, java.sql.SQLException)public void addStatementEventListener(javax.sql.StatementEventListener listener)
addStatementEventListener in interface javax.sql.PooledConnectionpublic void removeStatementEventListener(javax.sql.StatementEventListener listener)
removeStatementEventListener in interface javax.sql.PooledConnection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||