Package com.tick42.glue.internal.core
Class DefaultAsynchronousCloseable
java.lang.Object
com.tick42.glue.internal.core.DefaultAsynchronousCloseable
- All Implemented Interfaces:
AsynchronousCloseable,AutoCloseable
public class DefaultAsynchronousCloseable extends Object implements AsynchronousCloseable
-
Constructor Summary
Constructors Constructor Description DefaultAsynchronousCloseable() -
Method Summary
Modifier and Type Method Description CompletionStage<Void>closeAsync()Initiates a shutdown.CompletionStage<Void>onClose()Return a stage that will complete whenAsynchronousCloseable.closeAsync()is called and shutdown completes.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tick42.glue.core.AsynchronousCloseable
close
-
Constructor Details
-
DefaultAsynchronousCloseable
public DefaultAsynchronousCloseable()
-
-
Method Details
-
onClose
Description copied from interface:AsynchronousCloseableReturn a stage that will complete whenAsynchronousCloseable.closeAsync()is called and shutdown completes.- Specified by:
onClosein interfaceAsynchronousCloseable- Returns:
- a stage that will complete when shutdown is complete, never
null
-
closeAsync
Description copied from interface:AsynchronousCloseableInitiates a shutdown.- Specified by:
closeAsyncin interfaceAsynchronousCloseable- Returns:
- a stage that will complete when shutdown is complete, never
null
-