Package io.activej.async.process
Interface AsyncCloseable
-
- All Known Subinterfaces:
AsyncProcess
- All Known Implementing Classes:
AbstractAsyncCloseable,AsyncAccumulator
public interface AsyncCloseableDescribes methods that are used to handle exceptional behaviour or to handle closing.After
close(),closeEx(Throwable)orclose()is called, the following things should be done:- Resources held by an object should be freed
- All pending asynchronous operations should be completed exceptionally
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Cancels the process.voidcloseEx(@NotNull Throwable e)Closes process exceptionally in case an exception is thrown while executing the given process.
-
-
-
Field Detail
-
STATIC
static final Object STATIC
-
-
Method Detail
-
close
default void close()
Cancels the process.
-
closeEx
void closeEx(@NotNull @NotNull Throwable e)Closes process exceptionally in case an exception is thrown while executing the given process.- Parameters:
e- exception that is used to close process with
-
-