Class ExtensionMetadata.ExtensionHandlerInvoker

java.lang.Object
org.jdbi.v3.core.extension.ExtensionMetadata.ExtensionHandlerInvoker
Enclosing class:
ExtensionMetadata

public final class ExtensionMetadata.ExtensionHandlerInvoker extends Object
Wraps all config customizers and the handler for a specific method execution. An invoker is created using ExtensionMetadata.createExtensionHandlerInvoker(Object, Method, HandleSupplier, ConfigRegistry).
Since:
3.38.0
  • Method Details

    • invoke

      public Object invoke(Object... args)
      Invoke the registered extension handler code in the extension context. The extension context wraps the method that gets executed and a full customized configuration (both instance and method specific configuration customizers have been applied). The extension context is registered with the underlying handle to configure the handle when executing the registered ExtensionHandler.
      Parameters:
      args - The arguments to pass into the extension handler
      Returns:
      The result of the extension handler invocation
    • call

      public Object call(Callable<?> callable)
      Invoke a callable in the extension context. The extension context wraps the method that gets executed and a full customized configuration (both instance and method specific configuration customizers have been applied). The extension context is registered with the underlying handle to configure the handle when calling the Callable.call() method.
      This method is used by the generated classes from the jdbi3-generator annotation processor to execute predefined ExtensionHandler instances.
      Parameters:
      callable - The callable to use
      Returns:
      The result of the extension handler invocation
    • call

      public void call(Runnable runnable)
      Invoke a runnable in the extension context. The extension context wraps the method that gets executed and a full customized configuration (both instance and method specific configuration customizers have been applied). The extension context is registered with the underlying handle to configure the handle when calling the Runnable.run() method.
      This method is used by the generated classes from the jdbi3-generator annotation processor to execute predefined ExtensionHandler instances.
      Parameters:
      runnable - The runnable to use