Class HookInstance<E>

java.lang.Object
org.jppf.utils.hooks.HookInstance<E>
Type Parameters:
E - the type of th ehook's interface.

public class HookInstance<E> extends Object
Instance of a Hook.
Author:
Laurent Cohen
  • Constructor Details

    • HookInstance

      public HookInstance(E instance)
      Initialize this hook with the specified method and instance.
      Parameters:
      instance - the hook instance on which to invoke the method.
  • Method Details

    • invoke

      public Object invoke(String methodName, Object... parameters)
      Invoke the specified method on the hook instance, using the specified parameters.
      Parameters:
      methodName - the name of the method to invoke.
      parameters - the parmeters to use in the method invocation.
      Returns:
      the return value of th emethod, or null if the method does not return anything.
    • dispose

      public void dispose()
      Cleanup this hook instance and release its resources.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getInstance

      public E getInstance()
      Get the concrete instance.
      Returns:
      an instance of a hook interface implementation.