org.logicalcobwebs.proxool
类 WrappedConnection

java.lang.Object
  继承者 org.logicalcobwebs.proxool.WrappedConnection
所有已实现的接口:
org.logicalcobwebs.cglib.proxy.Callback, org.logicalcobwebs.cglib.proxy.MethodInterceptor

public class WrappedConnection
extends Object
implements org.logicalcobwebs.cglib.proxy.MethodInterceptor

Wraps up a ProxyConnection. It is proxied as a Connection

从以下版本开始:
Proxool 0.9
版本:
$Revision: 1.6 $, $Date: 2006/01/18 14:40:02 $
作者:
Bill Horsman, $Author: billhorsman $ (current maintainer)

构造方法摘要
WrappedConnection(ProxyConnection proxyConnection)
          Construct this wrapper around the proxy connection
 
方法摘要
 boolean equals(Object obj)
          If the object passed to this method is actually a proxied version of this class then compare the real class with this one.
 String getAlias()
          Get the alias of the connection pool this connection belongs to
 long getId()
          The ID for the encapsulated ProxyConnection.
 ProxyConnection getProxyConnection()
          Get the encapsulated proxy connection
 Object intercept(Object obj, Method method, Object[] args, org.logicalcobwebs.cglib.proxy.MethodProxy proxy)
          Delegates to invoke
 Object invoke(Object proxy, Method method, Object[] args)
          Delegates all operations to the encapsulated ProxyConnection except for: close() equals() hashCode() isClosed() getMetaData() finalize() It also spots mutators and remembers that the property has been changed so that it can be reset.
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

WrappedConnection

public WrappedConnection(ProxyConnection proxyConnection)
Construct this wrapper around the proxy connection

参数:
proxyConnection - to wrap
方法详细信息

getProxyConnection

public ProxyConnection getProxyConnection()
Get the encapsulated proxy connection

返回:
the proxy connection

intercept

public Object intercept(Object obj,
                        Method method,
                        Object[] args,
                        org.logicalcobwebs.cglib.proxy.MethodProxy proxy)
                 throws Throwable
Delegates to invoke

指定者:
接口 org.logicalcobwebs.cglib.proxy.MethodInterceptor 中的 intercept
抛出:
Throwable
另请参见:
MethodInterceptor.intercept(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], org.logicalcobwebs.cglib.proxy.MethodProxy)

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Delegates all operations to the encapsulated ProxyConnection except for: It also spots mutators and remembers that the property has been changed so that it can be reset. And any statements that are returned are remembered so that we can track whether all statements have been closed properly when the connection is returned to the pool.

抛出:
Throwable
另请参见:
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])

getId

public long getId()
The ID for the encapsulated ProxyConnection. This will still return the correct value after the connection is closed.

返回:
the ID

getAlias

public String getAlias()
Get the alias of the connection pool this connection belongs to

返回:
alias

equals

public boolean equals(Object obj)
If the object passed to this method is actually a proxied version of this class then compare the real class with this one.

覆盖:
Object 中的 equals
参数:
obj - the object to compare
返回:
true if the object is a proxy of "this"

toString

public String toString()
覆盖:
Object 中的 toString
另请参见:
Object.toString()


Copyright © 2014. All rights reserved.