Module io.smallrye.common.function
Package io.smallrye.common.function
Interface ExceptionRunnable<E extends Exception>
- Type Parameters:
E- the exception type
public interface ExceptionRunnable<E extends Exception>
An operation that can throw an exception.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ExceptionRunnable<E> andThen(ExceptionRunnable<? extends E> after) Returns a runnable which runs this task and then the given task.default ExceptionRunnable<E> compose(ExceptionRunnable<? extends E> before) Returns a runnable which runs the given task and then this task.voidrun()Run the operation.
-
Method Details
-
run
void run() throws ERun the operation.- Throws:
E- if an exception occurs
-
andThen
Returns a runnable which runs this task and then the given task.- Parameters:
after- the other task- Returns:
- a runnable which runs this task and then the given task
-
compose
Returns a runnable which runs the given task and then this task.- Parameters:
before- the other task- Returns:
- a runnable which runs the given task and then this task
-