Interface CallbackHandler

All Known Implementing Classes:
BatchCallbackHandler, ConnectionCallbackHandler, ConnectionFactoryCallbackHandler, ResultCallbackHandler, RowCallbackHandler, RowSegmentCallbackHandler, StatementCallbackHandler

public interface CallbackHandler
Callback logic for proxy invocation. The logic is separated from proxy handler to implementation of this interface in order to be reused in different proxy mechanism (JDK dynamic proxy, cglib, etc).
Author:
Tadaya Tsuyukubo
  • Method Summary

    Modifier and Type
    Method
    Description
    invoke(Object proxy, Method method, Object[] args)
    When proxy is invoked, actual implementation of the proxy handler delegates the invocation to this method.
  • Method Details

    • invoke

      @Nullable Object invoke(Object proxy, Method method, @Nullable Object[] args) throws Throwable
      When proxy is invoked, actual implementation of the proxy handler delegates the invocation to this method.
      Parameters:
      proxy - the proxy instance that the method was invoked on
      method - the method that has invoked on the proxy instance
      args - an array of objects that has passed to the method invocation. this can be null when method is invoked with no argument.
      Returns:
      result returned from the method invocation on the proxy instance. (can be null.)
      Throws:
      Throwable - the exception thrown from the method invocation on the proxy instance.
      IllegalArgumentException - if proxy is null
      IllegalArgumentException - if method is null