Interface HttpClientHandler
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
DefaultHttpClientHandler
public interface HttpClientHandler extends java.lang.AutoCloseableInterface for a class that contains a HttpClient and a HttpLogger.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHttpClientHandler.ConfTemplate<T extends HttpClientHandler.ConfTemplate<T>>Interface for the configuration parameters of a HttpClientHandler.static interfaceHttpClientHandler.ProxySpec
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Shut theHttpClientdown by shutting down its ExecutorService.HttpLoggergetHttpLogger()java.net.http.HttpClientgetOrBuildClient()Return the internalHttpClient.
-
-
-
Method Detail
-
getOrBuildClient
java.net.http.HttpClient getOrBuildClient()
Return the internalHttpClient.- Returns:
- The HttpClient
-
getHttpLogger
HttpLogger getHttpLogger()
- Returns:
- The HttpLogger to use with this class.
-
close
void close()
Shut the
HttpClientdown by shutting down its ExecutorService.Be aware, that there is a shutdown timeout so the Java 11 HttpClient can clean itself up properly. See
DefaultHttpClientHandler.Conf.setShutdownTimeout(long).- Specified by:
closein interfacejava.lang.AutoCloseable
-
-