Class ConnectionProxy

java.lang.Object
net.sourceforge.jtds.jdbcx.proxy.ConnectionProxy
All Implemented Interfaces:
AutoCloseable, Connection, Wrapper

public class ConnectionProxy extends Object implements Connection
This class would be better implemented as a java.lang.reflect.Proxy. However, this feature was not added until 1.3 and reflection performance was not improved until 1.4. Since the driver still needs to be compatible with 1.2 and 1.3 this class is used to delegate the calls to the connection with minimal overhead.
Version:
$Id: ConnectionProxy.java,v 1.7.2.3 2009-12-30 08:45:34 ickzon Exp $
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConnectionProxy(PooledConnection pooledConnection, Connection connection)
    Constructs a new connection proxy.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    abort(Executor executor)
     
    void
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    createArrayOf(String typeName, Object[] elements)
     
     
     
     
     
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    createStatement(int resultSetType, int resultSetConcurrency)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    createStruct(String typeName, Object[] attributes)
     
    protected void
    Closes the proxy, releasing the connection.
    boolean
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
     
     
    int
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    int
     
     
    int
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    boolean
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    boolean
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    boolean
    isValid(int timeout)
     
    boolean
     
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    prepareCall(String sql, int resultSetType, int resultSetConcurrency)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    prepareStatement(String sql, int autoGeneratedKeys)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    prepareStatement(String sql, int[] columnIndexes)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    prepareStatement(String sql, String[] columnNames)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    (package private) void
    Processes SQLExceptions.
    void
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    rollback(Savepoint savepoint)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    setAutoCommit(boolean autoCommit)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    setCatalog(String catalog)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    setClientInfo(String name, String value)
     
    void
     
    void
    setHoldability(int holdability)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    setNetworkTimeout(Executor executor, int milliseconds)
     
    void
    setReadOnly(boolean readOnly)
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    setSchema(String schema)
     
    void
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    void
    Delgates calls to the connection; SQLExceptions thrown from the connection will cause an event to be fired on the connection pool listeners.
    unwrap(Class arg0)
     
    private void
    Validates the connection state.

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait