Interface CallWrapper


public interface CallWrapper
Provides methods for wrapping other method calls. This can be useful to ensure preparations have been done for a larger set of various method calls, for example.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    call(Runnable runnable)
    Calls a mehtod that has no return value.
    <R> R
    call(Callable<R> callable)
    Calls a method that has a return value.
  • Method Details

    • call

      <R> R call(Callable<R> callable) throws Exception
      Calls a method that has a return value.
      Type Parameters:
      R - The return value's type.
      Parameters:
      callable - The method wrapped in a Callable instance.
      Returns:
      The result of the method's call.
      Throws:
      Exception - If there was an exception calling method.
    • call

      void call(Runnable runnable) throws Exception
      Calls a mehtod that has no return value.
      Parameters:
      runnable - The method wrapped in a Runnable instance.
      Throws:
      Exception - If there was an exception calling method.