Package com.linecorp.armeria.common.util
Interface ListenableAsyncCloseable
- All Superinterfaces:
AsyncCloseable
,AutoCloseable
- All Known Subinterfaces:
ClientFactory
- All Known Implementing Classes:
AsyncCloseableSupport
,ConsulEndpointGroup
,DecoratingClientFactory
,DnsAddressEndpointGroup
,DnsServiceEndpointGroup
,DnsTextEndpointGroup
,DynamicEndpointGroup
,EurekaEndpointGroup
,HealthCheckedEndpointGroup
,PropertiesEndpointGroup
,Server
,StartStopSupport
,ZooKeeperEndpointGroup
public interface ListenableAsyncCloseable extends AsyncCloseable
A variant of
AsyncCloseable
which allows a user to check whether the object is closed or to get
notified when closed.-
Method Summary
Modifier and Type Method Description boolean
isClosed()
Returns whetherAsyncCloseable.close()
orAsyncCloseable.closeAsync()
operation has been completed.boolean
isClosing()
Returns whetherAsyncCloseable.close()
orAsyncCloseable.closeAsync()
has been called.CompletableFuture<?>
whenClosed()
Returns theCompletableFuture
which is completed after theAsyncCloseable.close()
orAsyncCloseable.closeAsync()
operation is completed.Methods inherited from interface com.linecorp.armeria.common.util.AsyncCloseable
close, closeAsync
-
Method Details
-
isClosing
boolean isClosing()Returns whetherAsyncCloseable.close()
orAsyncCloseable.closeAsync()
has been called.- See Also:
isClosed()
-
isClosed
boolean isClosed()Returns whetherAsyncCloseable.close()
orAsyncCloseable.closeAsync()
operation has been completed.- See Also:
isClosing()
-
whenClosed
CompletableFuture<?> whenClosed()Returns theCompletableFuture
which is completed after theAsyncCloseable.close()
orAsyncCloseable.closeAsync()
operation is completed.
-