net.sf.log4jdbc
Interface Spy

All Known Implementing Classes:
CallableStatementSpy, ConnectionSpy, PreparedStatementSpy, ResultSetSpy, StatementSpy

public interface Spy

Common interface that all Spy classes can implement. This is used so that any class that is being spied upon can transmit generic information about itself to the whoever is doing the spying.

Author:
Arthur Blake

Method Summary
 java.lang.String getClassType()
          Get the type of class being spied upon.
 java.lang.Integer getConnectionNumber()
          Get the connection number.
 

Method Detail

getClassType

java.lang.String getClassType()
Get the type of class being spied upon. For example, "Statement", "ResultSet", etc.

Returns:
a description of the type of class being spied upon.

getConnectionNumber

java.lang.Integer getConnectionNumber()
Get the connection number. In general, this is used to track which underlying connection is being used from the database. The number will be incremented each time a new Connection is retrieved from the real underlying jdbc driver. This is useful for debugging and tracking down problems with connection pooling.

Returns:
the connection instance number.