Package org.opentcs.util
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 Details
-
call
<R> R call(java.util.concurrent.Callable<R> callable) throws java.lang.ExceptionCalls a method that has a return value.- Type Parameters:
R
- The return value's type.- Parameters:
callable
- The method wrapped in aCallable
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.ExceptionCalls a mehtod that has no return value.- Parameters:
runnable
- The method wrapped in aRunnable
instance.- Throws:
java.lang.Exception
- If there was an exception calling method.
-