Interface ReleasableResource

All Known Subinterfaces:
ClientConnection, Http1Client, Http2Client, HttpClient<REQ>, HttpClientSpi, WebClient
All Known Implementing Classes:
ClientConnectionCache, DirectClient, DirectWebClient, Http2ClientImpl, Http2ClientStream, Http2ConnectionCache, TcpClientConnection

public interface ReleasableResource
A resource that can be released or closed. This is used to handle HTTP/1.1 connection, for example. In other cases (such as HTTP/2 streams), the release call also closes the resource.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the resource, we cannot use name close, as that would conflict with AutoCloseable, as we do not want to have a checked exception thrown.
    default void
    Releases the resource, and if this resource is re-usable, enabled reuse.
  • Method Details

    • releaseResource

      default void releaseResource()
      Releases the resource, and if this resource is re-usable, enabled reuse.
    • closeResource

      void closeResource()
      Closes the resource, we cannot use name close, as that would conflict with AutoCloseable, as we do not want to have a checked exception thrown.