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