Interface Handler

All Superinterfaces:
ExtensionHandler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Deprecated(since="3.38.0", forRemoval=true) public interface Handler extends ExtensionHandler
Deprecated, for removal: This API element is subject to removal in a future version.
Use ExtensionHandler directly.
Implements the contract of a SQL Object method.
  • Field Summary

    Fields inherited from interface org.jdbi.v3.core.extension.ExtensionHandler

    EQUALS_HANDLER, HASHCODE_HANDLER, NULL_HANDLER
  • Method Summary

    Modifier and Type
    Method
    Description
    invoke(Object target, Object[] args, HandleSupplier handleSupplier)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Executes a SQL Object method, and returns the result.
    default Object
    invoke(HandleSupplier handleSupplier, Object target, Object... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets invoked to return a value for the method that this handler was bound to.

    Methods inherited from interface org.jdbi.v3.core.extension.ExtensionHandler

    warm
  • Method Details

    • invoke

      Object invoke(Object target, Object[] args, HandleSupplier handleSupplier) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Executes a SQL Object method, and returns the result.
      Parameters:
      target - the SQL Object instance being invoked
      args - the arguments that were passed to the method.
      handleSupplier - a (possibly lazy) Handle supplier.
      Returns:
      the method return value, or null if the method has a void return type.
      Throws:
      Exception - any exception thrown by the method.
    • invoke

      default Object invoke(HandleSupplier handleSupplier, Object target, Object... args) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExtensionHandler
      Gets invoked to return a value for the method that this handler was bound to.
      Specified by:
      invoke in interface ExtensionHandler
      Parameters:
      handleSupplier - A HandleSupplier instance for accessing the handle and its related objects
      target - The target object on which the handler should operate
      args - Optional arguments for the handler
      Returns:
      The return value for the method that was bound to the extension handler. Can be null
      Throws:
      Exception - Any exception from the underlying code