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, ClientH2PrefaceHandler, ClientH2StreamMultiplexer, ClientHttp1IOEventHandler, ClientHttp1StreamDuplexer, ClientSessionEndpoint, DefaultBHttpClientConnection, DefaultBHttpServerConnection, DefaultConnectingIOReactor, DefaultListeningIOReactor, H2AsyncRequester, H2ConnPool, H2MultiplexingRequester, HttpAsyncRequester, HttpAsyncServer, HttpProtocolNegotiator, HttpRequester, HttpServer, LaxConnPool, LoggingBHttpClientConnection, LoggingBHttpServerConnection, LoggingIOSession, ServerH2IOEventHandler, ServerH2PrefaceHandler, ServerH2StreamMultiplexer, ServerHttp1IOEventHandler, ServerHttp1StreamDuplexer, SSLIOSession, StrictConnPool

      public interface ModalCloseable
      extends Closeable

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

- - ### Method Summary

    All Methods Instance Methods Abstract 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–2021 The Apache Software Foundation. All rights reserved.