Package com.polarion.core.util
Class RunnableWEx<T>
java.lang.Object
com.polarion.core.util.RunnableWEx<T>
- All Implemented Interfaces:
Runnable
Runnable
which permits the execution of a set of operations that can throw exceptions and/or return a result.
It is used in many Polarion API calls, for example:
com.polarion.platform.persistence.IDataService#doInBaseline(String, RunnableWEx)
When the
run()
method is used, the exceptions are handled, when the runWEx()
("run with exception") method is used,
the exceptions are propagated and can additionally return the results of the operations.- Author:
- Roman Kratochvil, POLARION SOFTWARE
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
run()
abstract T
runWEx()
Similar to theRunnable.run()
method, but can return a result of the executed operations and the method can throw an exception.final T
runWRet()
Similar to theRunnable.run()
method, but can return a result of the executed operations.static RunnableWEx
-
Constructor Details
-
RunnableWEx
public RunnableWEx()
-
-
Method Details
-
wrap
-
run
public final void run() -
runWRet
Similar to theRunnable.run()
method, but can return a result of the executed operations. -
runWEx
Similar to theRunnable.run()
method, but can return a result of the executed operations and the method can throw an exception.- Throws:
Exception
-