Package net.officefloor.jdbc.test
Class ValidatePooledConnectionDecorator
- java.lang.Object
-
- net.officefloor.jdbc.test.ValidatePooledConnectionDecorator
-
- All Implemented Interfaces:
ServiceFactory<PooledConnectionDecorator>
,PooledConnectionDecorator
,PooledConnectionDecoratorServiceFactory
public class ValidatePooledConnectionDecorator extends java.lang.Object implements PooledConnectionDecorator, PooledConnectionDecoratorServiceFactory
PooledConnectionDecorator
to validate thePooledConnection
instances.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ValidatePooledConnectionDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PooledConnectionDecorator
createService(ServiceContext context)
Creates the service.javax.sql.PooledConnection
decorate(javax.sql.PooledConnection connection)
Allows decorating thePooledConnection
.
-
-
-
Method Detail
-
createService
public PooledConnectionDecorator createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactory
Creates the service.- Specified by:
createService
in interfaceServiceFactory<PooledConnectionDecorator>
- Parameters:
context
-ServiceContext
.- Returns:
- Service.
- Throws:
java.lang.Throwable
- If fails to create the service.
-
decorate
public javax.sql.PooledConnection decorate(javax.sql.PooledConnection connection)
Description copied from interface:PooledConnectionDecorator
Allows decorating thePooledConnection
.- Specified by:
decorate
in interfacePooledConnectionDecorator
- Parameters:
connection
-PooledConnection
to decorate.- Returns:
- Decorated
PooledConnection
or possibly new wrappingConnection
implementation.
-
-