Search in sources :

Example 1 with EventEmitterModule

use of uk.gov.ida.eventemitter.EventEmitterModule in project verify-hub by alphagov.

the class PolicyApplication method initialize.

@Override
public final void initialize(Bootstrap<PolicyConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    GuiceBundle<PolicyConfiguration> guiceBundle = new GuiceBundle<>(() -> asList(getPolicyModule(), new EventEmitterModule()), PolicyConfiguration.class);
    bootstrap.addBundle(guiceBundle);
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
    bootstrap.addBundle(new PrometheusBundle());
    bootstrap.addBundle(new IdaJsonProcessingExceptionMapperBundle());
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) GuiceBundle(uk.gov.ida.hub.shared.guice.GuiceBundle) IdaJsonProcessingExceptionMapperBundle(uk.gov.ida.hub.policy.exception.IdaJsonProcessingExceptionMapperBundle) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle) PolicyConfiguration(uk.gov.ida.hub.policy.configuration.PolicyConfiguration) EventEmitterModule(uk.gov.ida.eventemitter.EventEmitterModule) PrometheusBundle(uk.gov.ida.metrics.bundle.PrometheusBundle)

Example 2 with EventEmitterModule

use of uk.gov.ida.eventemitter.EventEmitterModule in project verify-hub by alphagov.

the class SamlSoapProxyApplication method initialize.

@Override
public final void initialize(Bootstrap<SamlSoapProxyConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    bootstrap.addBundle(verifyMetadataBundle);
    GuiceBundle<SamlSoapProxyConfiguration> guiceBundle = new GuiceBundle<>(() -> asList(new SamlSoapProxyModule(), new EventEmitterModule(), bindVerifyMetadata()), SamlSoapProxyConfiguration.class);
    bootstrap.addBundle(guiceBundle);
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
    bootstrap.addBundle(new PrometheusBundle());
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) GuiceBundle(uk.gov.ida.hub.shared.guice.GuiceBundle) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle) EventEmitterModule(uk.gov.ida.eventemitter.EventEmitterModule) PrometheusBundle(uk.gov.ida.metrics.bundle.PrometheusBundle)

Example 3 with EventEmitterModule

use of uk.gov.ida.eventemitter.EventEmitterModule in project verify-hub by alphagov.

the class SamlProxyApplication method initialize.

@Override
public final void initialize(Bootstrap<SamlProxyConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    GuiceBundle<SamlProxyConfiguration> guiceBundle = new GuiceBundle<>(() -> asList(new SamlProxyModule(), new EventEmitterModule()), SamlProxyConfiguration.class);
    bootstrap.addBundle(guiceBundle);
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
    bootstrap.addBundle(new PrometheusBundle());
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) GuiceBundle(uk.gov.ida.hub.shared.guice.GuiceBundle) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle) EventEmitterModule(uk.gov.ida.eventemitter.EventEmitterModule) PrometheusBundle(uk.gov.ida.metrics.bundle.PrometheusBundle)

Aggregations

EnvironmentVariableSubstitutor (io.dropwizard.configuration.EnvironmentVariableSubstitutor)3 SubstitutingSourceProvider (io.dropwizard.configuration.SubstitutingSourceProvider)3 LoggingBundle (uk.gov.ida.bundles.LoggingBundle)3 MonitoringBundle (uk.gov.ida.bundles.MonitoringBundle)3 ServiceStatusBundle (uk.gov.ida.bundles.ServiceStatusBundle)3 EventEmitterModule (uk.gov.ida.eventemitter.EventEmitterModule)3 GuiceBundle (uk.gov.ida.hub.shared.guice.GuiceBundle)3 PrometheusBundle (uk.gov.ida.metrics.bundle.PrometheusBundle)3 PolicyConfiguration (uk.gov.ida.hub.policy.configuration.PolicyConfiguration)1 IdaJsonProcessingExceptionMapperBundle (uk.gov.ida.hub.policy.exception.IdaJsonProcessingExceptionMapperBundle)1