Package org.kiwiproject.dropwizard.jdbi3
Class Jdbi3Builders
- java.lang.Object
-
- org.kiwiproject.dropwizard.jdbi3.Jdbi3Builders
-
public class Jdbi3Builders extends Object
Utilities for building Dropwizard-managedJdbiversion 3 instances.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_HEALTH_CHECK_NAME
-
Constructor Summary
Constructors Constructor Description Jdbi3Builders()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.jdbi.v3.core.JdbibuildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource, String healthCheckName, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)Build a Dropwizard-managedJdbiinstance with metrics and health check given anEnvironment, aPooledDataSourceFactory, aManagedDataSource, and a name to give the health check.static org.jdbi.v3.core.JdbibuildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)Build a Dropwizard-managedJdbiinstance with metrics and health check given anEnvironment, aPooledDataSourceFactory, and aManagedDataSource.static org.jdbi.v3.core.JdbibuildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, String healthCheckName, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)Build a Dropwizard-managedJdbiinstance with metrics and health check given anEnvironment, aPooledDataSourceFactory, and a name to give the health check.static org.jdbi.v3.core.JdbibuildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)Build a Dropwizard-managedJdbiinstance with metrics and health check given anEnvironmentandPooledDataSourceFactory.
-
-
-
Field Detail
-
DEFAULT_HEALTH_CHECK_NAME
public static final String DEFAULT_HEALTH_CHECK_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildManagedJdbi
public static org.jdbi.v3.core.Jdbi buildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)Build a Dropwizard-managedJdbiinstance with metrics and health check given anEnvironmentandPooledDataSourceFactory. This will also registerSqlObjectPluginwith JDBI before returning it.- Parameters:
environment- theEnvironmentdataSourceFactory- thePooledDataSourceFactoryjdbiPlugins- any otherJdbiPluginobjects desired- Returns:
- the
Jdbiinstance - Implementation Note:
- With the exception of
SqlObjectPlugin, this method will allow you to install multiple of the same plugin. User beware.
-
buildManagedJdbi
public static org.jdbi.v3.core.Jdbi buildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, String healthCheckName, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)Build a Dropwizard-managedJdbiinstance with metrics and health check given anEnvironment, aPooledDataSourceFactory, and a name to give the health check.- Parameters:
environment- theEnvironmentdataSourceFactory- thePooledDataSourceFactoryhealthCheckName- the health check's namejdbiPlugins- any otherJdbiPluginobjects desired- Returns:
- the
Jdbiinstance - Implementation Note:
- With the exception of
SqlObjectPlugin, this method will allow you to install multiple of the same plugin. User beware.
-
buildManagedJdbi
public static org.jdbi.v3.core.Jdbi buildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)Build a Dropwizard-managedJdbiinstance with metrics and health check given anEnvironment, aPooledDataSourceFactory, and aManagedDataSource. This will also registerSqlObjectPluginwith JDBI before returning it.- Parameters:
environment- theEnvironmentdataSourceFactory- thePooledDataSourceFactorydataSource- theManagedDataSourcejdbiPlugins- any otherJdbiPluginobjects desired- Returns:
- the
Jdbiinstance - Implementation Note:
- With the exception of
SqlObjectPlugin, this method will allow you to install multiple of the same plugin. User beware.
-
buildManagedJdbi
public static org.jdbi.v3.core.Jdbi buildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource, String healthCheckName, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)Build a Dropwizard-managedJdbiinstance with metrics and health check given anEnvironment, aPooledDataSourceFactory, aManagedDataSource, and a name to give the health check. This will also registerSqlObjectPluginwith JDBI before returning it.- Parameters:
environment- theEnvironmentdataSourceFactory- thePooledDataSourceFactorydataSource- theManagedDataSourcehealthCheckName- the health check's namejdbiPlugins- any otherJdbiPluginobjects desired- Returns:
- the
Jdbiinstance - Implementation Note:
- With the exception of
SqlObjectPlugin, this method will allow you to install multiple of the same plugin. User beware.
-
-