Package org.jdbi.v3.core.spi
Interface JdbiPlugin
- All Known Implementing Classes:
CaffeineCachePlugin,ConfiguringPlugin,Gson2Plugin,GuavaPlugin,H2DatabasePlugin,Jackson2Plugin,JdbiOpenTelemetryPlugin,JdbiPlugin.Singleton,JodaTimePlugin,JpaPlugin,JsonPlugin,MoshiPlugin,NoopCachePlugin,PostgisPlugin,PostgresPlugin,SQLitePlugin,SqlObjectPlugin,VavrPlugin
public interface JdbiPlugin
A plugin is given an opportunity to customize instances of various
Jdbi
types before they are returned from their factories.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAbstract base class for single-install JdbiPlugins. -
Method Summary
Modifier and TypeMethodDescriptiondefault ConnectionConfigure customizations for a newly acquired Connection.default HandlecustomizeHandle(Handle handle) Configure customizations for a new Handle instance.default voidcustomizeJdbi(Jdbi jdbi) Configure customizations global to any object managed by this Jdbi.
-
Method Details
-
customizeJdbi
Configure customizations global to any object managed by this Jdbi. This method is invoked immediately when the plugin is installed.- Parameters:
jdbi- the jdbi to customize- Throws:
SQLException- something went wrong with the database
-
customizeHandle
Configure customizations for a new Handle instance.- Parameters:
handle- the handle just created- Returns:
- the transformed handle
- Throws:
SQLException- something went wrong with the database
-
customizeConnection
Configure customizations for a newly acquired Connection.- Parameters:
conn- the connection Jdbi acquired- Returns:
- the transformed connection to use
- Throws:
SQLException- something went wrong with the database
-