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​(java.lang.Runnable runnable)
    Calls a mehtod that has no return value.
    <R> R call​(java.util.concurrent.Callable<R> callable)
    Calls a method that has a return value.
  • Method Details

    • call

      <R> R call​(java.util.concurrent.Callable<R> callable) throws java.lang.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:
      java.lang.Exception - If there was an exception calling method.
    • call

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