org.apache.hc.core5.io

## Interface ModalCloseable

- All Superinterfaces:
    AutoCloseable, Closeable
  All Known Subinterfaces:
    BHttpConnection, HttpClientConnection, HttpConnection, HttpConnectionEventHandler, HttpServerConnection, IOReactor, IOReactorService, IOSession, ListenerEndpoint, ManagedConnPool<T,C>, ProtocolIOSession, SocketModalCloseable
  All Known Implementing Classes:
    AbstractIOSessionPool, AsyncRequester, AsyncServer, ClientH2IOEventHandler, ClientH2StreamMultiplexer, ClientHttp1IOEventHandler, ClientHttp1StreamDuplexer, ClientHttpProtocolNegotiator, ClientSessionEndpoint, DefaultBHttpClientConnection, DefaultBHttpServerConnection, DefaultConnectingIOReactor, DefaultListeningIOReactor, H2AsyncRequester, H2ConnPool, H2MultiplexingRequester, H2OnlyClientProtocolNegotiator, H2OnlyServerHttpProtocolNegotiator, HttpAsyncRequester, HttpAsyncServer, HttpRequester, HttpServer, LaxConnPool, LoggingBHttpClientConnection, LoggingBHttpServerConnection, LoggingIOSession, ServerH2IOEventHandler, ServerH2StreamMultiplexer, ServerHttp1IOEventHandler, ServerHttp1StreamDuplexer, ServerHttpProtocolNegotiator, SSLIOSession, StrictConnPool

      public interface ModalCloseable
      extends Closeable

  Process or endpoint that can be closed either immediately or gracefully.
  Since:
    5.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(CloseMode closeMode)` Closes this process or endpoint and releases any system resources associated with it.

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Method Detail

    - #### close

          void close(CloseMode closeMode)

      Closes this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.
      Parameters:
        `closeMode` - How to close the receiver.

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.