Class CloseableHttpClientProvider
- java.lang.Object
-
- org.forgerock.openam.shared.guice.CloseableHttpClientProvider
-
- All Implemented Interfaces:
com.google.inject.Provider<org.forgerock.http.Client>,jakarta.inject.Provider<org.forgerock.http.Client>
public class CloseableHttpClientProvider extends Object implements com.google.inject.Provider<org.forgerock.http.Client>
This class provides Guice with instances of Client that contain a HttpClientHandler. The underlying HttpClientHandler is registered with the ShutdownManager to tidy up threads when the server is stopped.- Since:
- 13.5.0
-
-
Constructor Summary
Constructors Constructor Description CloseableHttpClientProvider(org.forgerock.http.handler.HttpClientHandler httpClientHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.forgerock.http.Clientget()Creates an instance of Client, assuring that underlying commitments are observer, i.e. listening for shutdown.
-
-
-
Method Detail
-
get
public org.forgerock.http.Client get()
Creates an instance of Client, assuring that underlying commitments are observer, i.e. listening for shutdown.- Specified by:
getin interfacecom.google.inject.Provider<org.forgerock.http.Client>- Specified by:
getin interfacejakarta.inject.Provider<org.forgerock.http.Client>- Returns:
- An instance of Client, or null if an exception occurred during creation.
-
-