Package net.officefloor.jdbc.hikari
Class HikariDataSourceTransformer
- java.lang.Object
-
- net.officefloor.jdbc.hikari.HikariDataSourceTransformer
-
- All Implemented Interfaces:
ServiceFactory<DataSourceTransformer>
,DataSourceTransformer
,DataSourceTransformerServiceFactory
public class HikariDataSourceTransformer extends java.lang.Object implements DataSourceTransformer, DataSourceTransformerServiceFactory
Wraps theDataSource
withHikariDataSource
for pooling.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description HikariDataSourceTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourceTransformer
createService(ServiceContext context)
Creates the service.javax.sql.DataSource
transformDataSource(DataSourceTransformerContext context)
Transforms theDataSource
.
-
-
-
Method Detail
-
createService
public DataSourceTransformer createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactory
Creates the service.- Specified by:
createService
in interfaceServiceFactory<DataSourceTransformer>
- Parameters:
context
-ServiceContext
.- Returns:
- Service.
- Throws:
java.lang.Throwable
- If fails to create the service.
-
transformDataSource
public javax.sql.DataSource transformDataSource(DataSourceTransformerContext context) throws java.lang.Exception
Description copied from interface:DataSourceTransformer
Transforms theDataSource
.- Specified by:
transformDataSource
in interfaceDataSourceTransformer
- Parameters:
context
-DataSourceTransformerContext
.- Returns:
- Transformed
DataSource
. - Throws:
java.lang.Exception
- If fails to transform theDataSource
.
-
-