Class ConstantHandleSupplier

java.lang.Object
org.jdbi.v3.core.AbstractHandleSupplier
org.jdbi.v3.core.ConstantHandleSupplier
All Implemented Interfaces:
AutoCloseable, HandleSupplier

final class ConstantHandleSupplier extends AbstractHandleSupplier
  • Field Details

    • handle

      private final Handle handle
  • Constructor Details

    • ConstantHandleSupplier

      ConstantHandleSupplier(Handle handle)
  • Method Details

    • of

      static HandleSupplier of(Handle handle)
    • getJdbi

      public Jdbi getJdbi()
      Description copied from interface: HandleSupplier
      Returns the owning Jdbi instance.
      Returns:
      The owning Jdbi instance.
    • getConfig

      public ConfigRegistry getConfig()
      Description copied from interface: HandleSupplier
      Returns the current Jdbi config.
      Returns:
      The current Jdbi configuration.
    • getHandle

      public Handle getHandle()
      Description copied from interface: HandleSupplier
      Returns a handle, possibly creating it lazily. A Handle holds a database connection, so extensions should only call this method in order to interact with the database.
      Returns:
      An open Handle.
    • withHandle

      protected void withHandle(Consumer<Handle> handleConsumer)
      Specified by:
      withHandle in class AbstractHandleSupplier