|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.common.jdbc.ConnectionWrapperFactory
public abstract class ConnectionWrapperFactory
Factory for creating wrappers around a Connection, allowing one to override the behavior of the Connection.close()
method.
Nested Class Summary | |
---|---|
static interface |
ConnectionWrapperFactory.ConnectionCloseHandler
Interface defining an operation to close the wrapped connection |
static class |
ConnectionWrapperFactory.NoOpCloseHandler
Implementation of ConnectionCloseHandler that does nothing on close. |
Method Summary | ||
---|---|---|
static
|
wrap(Connection connection,
Class<I> wrapperInterface,
I wrapperHandler,
ConnectionWrapperFactory.ConnectionCloseHandler closeHandler)
Wrap the given connection , creating a Proxy with an additional wrapperInterface
(implemented by given wrapperHandler ). |
|
static Connection |
wrap(Connection connection,
ConnectionWrapperFactory.ConnectionCloseHandler closeHandler)
Wrap the given connection , creating a Proxy with an additional wrapperInterface
(implemented by given wrapperHandler ). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <I> Connection wrap(Connection connection, Class<I> wrapperInterface, I wrapperHandler, ConnectionWrapperFactory.ConnectionCloseHandler closeHandler)
connection
, creating a Proxy with an additional wrapperInterface
(implemented by given wrapperHandler
). Calls to the close method are forwarded to the given
closeHandler
.
Note that all invocations on methods declared on the wrapperInterface
(including equals, hashCode)
are forwarded to the wrapperHandler
.
I
- The type of additional interface for the wrapper to implementconnection
- The connection to wrapwrapperInterface
- The additional interface to implementwrapperHandler
- The implementation for the additional interfacecloseHandler
- The handler to redirect close invocations to
public static Connection wrap(Connection connection, ConnectionWrapperFactory.ConnectionCloseHandler closeHandler)
connection
, creating a Proxy with an additional wrapperInterface
(implemented by given wrapperHandler
). Calls to the close method are forwarded to the given
closeHandler
.
connection
- The connection to wrapcloseHandler
- The handler to redirect close invocations to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |