Search in sources :

Example 6 with ClientProvider

use of uk.gov.ida.restclient.ClientProvider in project verify-hub by alphagov.

the class SamlProxyModule method jsonClient.

@Provides
@Singleton
public JsonClient jsonClient(JsonResponseProcessor jsonResponseProcessor, Environment environment, SamlProxyConfiguration configuration) {
    Client client = new ClientProvider(environment, configuration.getJerseyClientConfiguration(), configuration.getEnableRetryTimeOutConnections(), "samlProxyClient").get();
    ErrorHandlingClient errorHandlingClient = new ErrorHandlingClient(client);
    return new JsonClient(errorHandlingClient, jsonResponseProcessor);
}
Also used : JsonClient(uk.gov.ida.jerseyclient.JsonClient) DefaultClientProvider(uk.gov.ida.jerseyclient.DefaultClientProvider) ClientProvider(uk.gov.ida.restclient.ClientProvider) Client(javax.ws.rs.client.Client) JsonClient(uk.gov.ida.jerseyclient.JsonClient) ErrorHandlingClient(uk.gov.ida.jerseyclient.ErrorHandlingClient) ErrorHandlingClient(uk.gov.ida.jerseyclient.ErrorHandlingClient) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Aggregations

ClientProvider (uk.gov.ida.restclient.ClientProvider)6 Provides (com.google.inject.Provides)5 Singleton (javax.inject.Singleton)5 Client (javax.ws.rs.client.Client)5 DefaultClientProvider (uk.gov.ida.jerseyclient.DefaultClientProvider)5 ErrorHandlingClient (uk.gov.ida.jerseyclient.ErrorHandlingClient)5 JsonClient (uk.gov.ida.jerseyclient.JsonClient)5 RedisClient (io.lettuce.core.RedisClient)3 SocketException (java.net.SocketException)1 SocketTimeoutException (java.net.SocketTimeoutException)1 Named (javax.inject.Named)1 NoHttpResponseException (org.apache.http.NoHttpResponseException)1 ConnectTimeoutException (org.apache.http.conn.ConnectTimeoutException)1 JerseyClientWithRetryBackoffConfiguration (uk.gov.ida.configuration.JerseyClientWithRetryBackoffConfiguration)1 AttributeQueryRequestClient (uk.gov.ida.hub.samlsoapproxy.client.AttributeQueryRequestClient)1 HealthCheckSoapRequestClient (uk.gov.ida.hub.samlsoapproxy.client.HealthCheckSoapRequestClient)1 MatchingServiceHealthCheckClient (uk.gov.ida.hub.samlsoapproxy.client.MatchingServiceHealthCheckClient)1 PrometheusClient (uk.gov.ida.hub.samlsoapproxy.client.PrometheusClient)1 SoapRequestClient (uk.gov.ida.hub.samlsoapproxy.client.SoapRequestClient)1