Search in sources :

Example 1 with ErrorHandlingClient

use of uk.gov.ida.jerseyclient.ErrorHandlingClient in project verify-hub by alphagov.

the class SamlSoapProxyModule method jsonClient.

@Provides
@Singleton
public JsonClient jsonClient(JsonResponseProcessor jsonResponseProcessor, Environment environment, SamlSoapProxyConfiguration configuration) {
    Client client = new ClientProvider(environment, configuration.getJerseyClientConfiguration(), configuration.getEnableRetryTimeOutConnections(), "samlSoapProxyClient").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) HealthCheckSoapRequestClient(uk.gov.ida.hub.samlsoapproxy.client.HealthCheckSoapRequestClient) MatchingServiceHealthCheckClient(uk.gov.ida.hub.samlsoapproxy.client.MatchingServiceHealthCheckClient) Client(javax.ws.rs.client.Client) AttributeQueryRequestClient(uk.gov.ida.hub.samlsoapproxy.client.AttributeQueryRequestClient) JsonClient(uk.gov.ida.jerseyclient.JsonClient) SoapRequestClient(uk.gov.ida.hub.samlsoapproxy.client.SoapRequestClient) ErrorHandlingClient(uk.gov.ida.jerseyclient.ErrorHandlingClient) ErrorHandlingClient(uk.gov.ida.jerseyclient.ErrorHandlingClient) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Example 2 with ErrorHandlingClient

use of uk.gov.ida.jerseyclient.ErrorHandlingClient in project verify-hub by alphagov.

the class SamlEngineModule method jsonClient.

@Provides
@Singleton
private JsonClient jsonClient(JsonResponseProcessor jsonResponseProcessor, Environment environment, SamlEngineConfiguration configuration) {
    Client client = new ClientProvider(environment, configuration.getJerseyClientConfiguration(), configuration.getEnableRetryTimeOutConnections(), "samlEngineClient").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) JsonClient(uk.gov.ida.jerseyclient.JsonClient) Client(javax.ws.rs.client.Client) ErrorHandlingClient(uk.gov.ida.jerseyclient.ErrorHandlingClient) ErrorHandlingClient(uk.gov.ida.jerseyclient.ErrorHandlingClient) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Example 3 with ErrorHandlingClient

use of uk.gov.ida.jerseyclient.ErrorHandlingClient in project verify-hub by alphagov.

the class PolicyModule method jsonClient.

@Provides
@Singleton
public JsonClient jsonClient(JsonResponseProcessor jsonResponseProcessor, Environment environment, PolicyConfiguration configuration) {
    Client client = new ClientProvider(environment, configuration.getJerseyClientConfiguration(), configuration.getEnableRetryTimeOutConnections(), "policyClient").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)

Example 4 with ErrorHandlingClient

use of uk.gov.ida.jerseyclient.ErrorHandlingClient in project verify-hub by alphagov.

the class PolicyModule method forSamlSoapProxy.

@Provides
@Singleton
@Named("samlSoapProxyClient")
public JsonClient forSamlSoapProxy(JsonResponseProcessor responseProcessor, PolicyConfiguration configuration, Environment environment) {
    Client client = new ClientProvider(environment, configuration.getSamlSoapProxyClient(), configuration.getEnableRetryTimeOutConnections(), "SamlSoapProxyClient").get();
    ErrorHandlingClient errorHandlingClient = new ErrorHandlingClient(client);
    return new JsonClient(errorHandlingClient, responseProcessor);
}
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) Named(javax.inject.Named) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Example 5 with ErrorHandlingClient

use of uk.gov.ida.jerseyclient.ErrorHandlingClient 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

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 ClientProvider (uk.gov.ida.restclient.ClientProvider)5 Named (javax.inject.Named)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 SoapRequestClient (uk.gov.ida.hub.samlsoapproxy.client.SoapRequestClient)1