com.caucho.sql.spy
Class SpyPooledConnection

java.lang.Object
  extended by com.caucho.sql.spy.SpyPooledConnection
All Implemented Interfaces:
javax.sql.PooledConnection
Direct Known Subclasses:
SpyXAConnection

public class SpyPooledConnection
extends java.lang.Object
implements javax.sql.PooledConnection

Spying on a connection.


Field Summary
protected  java.lang.String _id
           
protected static L10N L
           
protected static java.util.logging.Logger log
           
 
Constructor Summary
SpyPooledConnection(javax.sql.PooledConnection conn, java.lang.String id)
          Creates a new SpyConnection.
 
Method Summary
 void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
           
 void addStatementEventListener(javax.sql.StatementEventListener listener)
           
 void close()
           
 java.sql.Connection getConnection()
           
protected  void log(long start, java.lang.String msg)
           
 void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
           
 void removeStatementEventListener(javax.sql.StatementEventListener listener)
           
protected  long start()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log

L

protected static final L10N L

_id

protected java.lang.String _id
Constructor Detail

SpyPooledConnection

public SpyPooledConnection(javax.sql.PooledConnection conn,
                           java.lang.String id)
Creates a new SpyConnection.

Method Detail

start

protected long start()

log

protected void log(long start,
                   java.lang.String msg)

addConnectionEventListener

public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
Specified by:
addConnectionEventListener in interface javax.sql.PooledConnection

removeConnectionEventListener

public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
Specified by:
removeConnectionEventListener in interface javax.sql.PooledConnection

addStatementEventListener

public void addStatementEventListener(javax.sql.StatementEventListener listener)
Specified by:
addStatementEventListener in interface javax.sql.PooledConnection

removeStatementEventListener

public void removeStatementEventListener(javax.sql.StatementEventListener listener)
Specified by:
removeStatementEventListener in interface javax.sql.PooledConnection

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.PooledConnection
Throws:
java.sql.SQLException

close

public void close()
           throws java.sql.SQLException
Specified by:
close in interface javax.sql.PooledConnection
Throws:
java.sql.SQLException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object