Interface ReleasableResource
- All Known Subinterfaces:
ClientConnection, Http1Client, Http2Client, HttpClient<REQ>, HttpClientSpi, WebClient
- All Known Implementing Classes:
ClientConnectionCache, DirectClient, DirectWebClient, Http2ClientImpl, Http2ClientStream, Http2ConnectionCache, TcpClientConnection, UnixDomainSocketClientConnection
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 TypeMethodDescriptionvoidCloses the resource, we cannot use nameclose, as that would conflict withAutoCloseable, as we do not want to have a checked exception thrown.default voidReleases 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 nameclose, as that would conflict withAutoCloseable, as we do not want to have a checked exception thrown.
-