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
PooledConnectionDecoratorto validate thePooledConnectioninstances.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ValidatePooledConnectionDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PooledConnectionDecoratorcreateService(ServiceContext context)Creates the service.javax.sql.PooledConnectiondecorate(javax.sql.PooledConnection connection)Allows decorating thePooledConnection.
-
-
-
Method Detail
-
createService
public PooledConnectionDecorator createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactoryCreates the service.- Specified by:
createServicein 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:PooledConnectionDecoratorAllows decorating thePooledConnection.- Specified by:
decoratein interfacePooledConnectionDecorator- Parameters:
connection-PooledConnectionto decorate.- Returns:
- Decorated
PooledConnectionor possibly new wrappingConnectionimplementation.
-
-