Package jenkins.util

Interface ThrowingCallable<V,T extends Throwable>

Type Parameters:
V - the return type
T - the checked exception type, or might be RuntimeException
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ThrowingCallable<V,T extends Throwable>
A task that returns a result and may throw an exception. Similar to Callable except that the exception type can be constrained. Similar to Callable or NotReallyRoleSensitiveCallable except
  • It is not Serializable, which would cause SpotBugs to complain about captured local variables.
  • It does not have the RoleSensitive.checkRoles(org.jenkinsci.remoting.RoleChecker) so it can be a FunctionalInterface.
Similar to ThrowingRunnable but returns a value.
Since:
TODO
  • Method Summary

    Modifier and Type
    Method
    Description
    Computes a result, or throws an exception if unable to do so.
  • Method Details

    • call

      V call() throws T
      Computes a result, or throws an exception if unable to do so.
      Returns:
      computed result
      Throws:
      T - if unable to compute a result