@Override protected void initialize(UniversityFooConfiguration configuration, Environment environment) throws ClassNotFoundException { environment .addProvider(new OAuthProvider<AuthenticatedPrincipal>(new OAuthAuthenticator(configuration), "protected-resources")); environment.addResource(new UniversityResource()); }
@Override public void runWithBundles(C configuration, Environment environment) throws Exception { environment.addServerLifecycleListener(new ServerLifecycleListener() { @Override public void serverStarted(Server server) { jettyServer = server; } }); DropwizardServiceRule.this.configuration = configuration; DropwizardServiceRule.this.environment = environment; super.runWithBundles(configuration, environment); } };
/** * Validate the Jersey resources before launching. */ public void validateJerseyResources() { logResources(); } }
@Override public void run(Environment environment) { environment.addProvider(ViewMessageBodyWriter.class); } }
@Override public void initialize(Bootstrap<HVDFConfiguration> configBootstrap) { configBootstrap.setName("hvdf"); configBootstrap.addCommand( new ServerMonitoringSimulatorLoad() ); }
@Override public void initialize(Bootstrap<Configuration> bootstrap) { bootstrap.setName("pizza-application"); }
@Override public void run(Environment environment) { environment.addServlet(createServlet(), uriPath + '*'); }
public static <T> ConfigurationFactory<T> forClass(Class<T> klass, Validator validator) { return forClass(klass, validator, ImmutableList.<Module>of()); }
/** * Creates a new {@link ConfigurationException} for the given file with the given errors. * * @param location the location of the bad configuration file * @param errors the errors in the file */ public ConfigurationException(String location, Iterable<String> errors) { super(formatMessage(location, errors)); }
@Override public ImmutableMultimap<String, FilterHolder> getFilters() { return super.getFilters(); }
@Override public ImmutableSet<Task> getTasks() { return super.getTasks(); }
@Override public ImmutableSet<HealthCheck> getHealthChecks() { return super.getHealthChecks(); }
@Override public Resource getBaseResource() { return super.getBaseResource(); }
@Override public ImmutableSet<String> getProtectedTargets() { return super.getProtectedTargets(); }
@Override public ImmutableMap<String, ServletHolder> getServlets() { return super.getServlets(); }
@Override public ImmutableSet<EventListener> getServletListeners() { return super.getServletListeners(); }
public static <T> ConfigurationFactory<T> forClass(Class<T> klass, Validator validator, Iterable<Module> modules) { return new ConfigurationFactory<T>(klass, validator, modules); }
public void shutDown() { try { this.environment.stop(); } catch (Exception e) { logger.error("Failed to stop environment cleanly due to {}", e); } }
@Override public void run(Environment environment) { environment.addProvider(new ScalaCollectionsQueryParamInjectableProvider()); } }
public static <T> ConfigurationFactory<T> forClass(Class<T> klass) { return forClass(klass, new Validator()); }