Package io.activej.async.process
Interface AsyncCloseable
- All Known Subinterfaces:
ReactiveProcess
- All Known Implementing Classes:
AbstractAsyncCloseable,AsyncAccumulator
public interface AsyncCloseable
Describes methods that are used to handle exceptional behaviour or to handle closing.
After close(), or closeEx(Exception) is called, the following things
should be done:
- Resources held by an object should be freed
- All pending asynchronous operations should be completed exceptionally
-
Field Summary
Fields -
Method Summary
-
Field Details
-
STATIC
-
-
Method Details
-
close
default void close()Cancels the process. -
closeEx
Closes process exceptionally in case an exception is thrown while executing the given process.- Parameters:
e- exception that is used to close process with
-
of
-