Skip to content

Commit

Permalink
Releasable client SPI
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkec committed Nov 21, 2023
1 parent 476f053 commit cc83f8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ public HttpClientRequest method(Method method) {
@Override
public void closeResource() {
for (ProtocolSpi o : List.copyOf(clientSpiByProtocol.values())) {
if (o.spi() instanceof ReleasableResource cl) {
cl.releaseResource();
}
o.spi().releaseResource();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
import io.helidon.webclient.api.ClientRequest;
import io.helidon.webclient.api.ClientUri;
import io.helidon.webclient.api.FullClientRequest;
import io.helidon.webclient.api.ReleasableResource;

/**
* Integration for HTTP versions to provide a single API.
*/
public interface HttpClientSpi {
public interface HttpClientSpi extends ReleasableResource {
/**
* Return whether this HTTP version can handle the provided request.
* <p>
Expand Down

0 comments on commit cc83f8d

Please sign in to comment.