|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.slim3.datasource.ConnectionInvocationHandler
public class ConnectionInvocationHandler
InvocationHandler for connection.
| Field Summary | |
|---|---|
protected AtomicBoolean |
closed
Whether logical connection is closed. |
protected static Log |
log
The log. |
protected Connection |
physicalConnection
The original connection. |
protected XAConnectionImpl |
pooledConnection
The pooled connection. |
protected XAResourceImpl |
xaResource
The XA resource. |
protected Xid |
xid
The transaction identifier. |
| Constructor Summary | |
|---|---|
ConnectionInvocationHandler(XAConnectionImpl pooledConnection)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
assertOpened()
Asserts this connection is opened. |
protected void |
close()
Closes logical connection. |
protected void |
closeForError(SQLException error)
Closes logical connection when error has occurred. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
protected boolean |
isClosed()
Determines if this connection is closed. |
protected boolean |
isCloseMethod(Method method)
Determines if the method is "close" method. |
protected boolean |
isEqualsMethod(Method method)
Determines if the method is "getPhysicalConnection" method. |
protected boolean |
isGetPhysicalConnectionMethod(Method method)
Determines if the method is "getPhysicalConnection" method. |
protected boolean |
isIsClosedMethod(Method method)
Determines if the method is "isClosed" method. |
protected boolean |
isSameProxy(Object o)
Determines if an object is same proxy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Log log
protected final Connection physicalConnection
protected final XAConnectionImpl pooledConnection
protected final XAResourceImpl xaResource
protected final Xid xid
protected AtomicBoolean closed
| Constructor Detail |
|---|
public ConnectionInvocationHandler(XAConnectionImpl pooledConnection)
throws NullPointerException
pooledConnection - the pooled connection
NullPointerException - if the pooledConnection parameter is null| Method Detail |
|---|
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
invoke in interface InvocationHandlerThrowable
protected boolean isClosed()
throws RuntimeException
RuntimeException - if SystemException is encountered
protected void assertOpened()
throws SQLException
SQLExceptionprotected boolean isCloseMethod(Method method)
method - the method
protected boolean isIsClosedMethod(Method method)
method - the method
protected boolean isGetPhysicalConnectionMethod(Method method)
method - the method
protected boolean isEqualsMethod(Method method)
method - the method
protected void close()
throws SQLException
SQLException - if an exception is encounteredprotected void closeForError(SQLException error)
error - the errorprotected boolean isSameProxy(Object o)
o - an object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||