/** * Called by {@link #run(String...)} to add the standard "server" and "check" commands * * @param bootstrap the bootstrap instance */ protected void addDefaultCommands(Bootstrap<T> bootstrap) { bootstrap.addCommand(new ServerCommand<>(this)); bootstrap.addCommand(new CheckCommand<>(this)); }
public final void initialize(Bootstrap<?> bootstrap) { Class klass = Generics.getTypeParameter(this.getClass(), Configuration.class); bootstrap.addCommand(new NameableDbCommand(name, migrations, this, klass)); }
@Override public void initialize(Bootstrap<WhisperServerConfiguration> bootstrap) { bootstrap.addCommand(new DirectoryCommand()); bootstrap.addCommand(new VacuumCommand()); bootstrap.addCommand(new TrimMessagesCommand()); bootstrap.addCommand(new PeriodicStatsCommand()); bootstrap.addCommand(new DeleteUserCommand()); bootstrap.addCommand(new CertificateCommand()); bootstrap.addBundle(new NameableMigrationsBundle<WhisperServerConfiguration>("accountdb", "accountsdb.xml") { @Override public DataSourceFactory getDataSourceFactory(WhisperServerConfiguration configuration) { return configuration.getDataSourceFactory(); } }); bootstrap.addBundle(new NameableMigrationsBundle<WhisperServerConfiguration>("messagedb", "messagedb.xml") { @Override public DataSourceFactory getDataSourceFactory(WhisperServerConfiguration configuration) { return configuration.getMessageStoreConfiguration(); } }); bootstrap.addBundle(new NameableMigrationsBundle<WhisperServerConfiguration>("abusedb", "abusedb.xml") { @Override public PooledDataSourceFactory getDataSourceFactory(WhisperServerConfiguration configuration) { return configuration.getAbuseDatabaseConfiguration(); } }); }
@Override @SuppressWarnings("unchecked") public final void initialize(Bootstrap<?> bootstrap) { final Class<T> klass = (Class<T>) bootstrap.getApplication().getConfigurationClass(); bootstrap.addCommand(new DbCommand<>(name(), this, klass, getMigrationsFileName())); }
@Override public void initialize(Bootstrap<GraphHopperServerConfiguration> bootstrap) { bootstrap.addBundle(new GraphHopperBundle()); bootstrap.addBundle(new ConfiguredAssetsBundle("/assets/", "/maps/", "index.html")); bootstrap.addCommand(new ImportCommand(bootstrap.getObjectMapper())); }
@Override public void initialize(Bootstrap<HelloWorldConfiguration> bootstrap) { // Enable variable substitution with environment variables bootstrap.setConfigurationSourceProvider( new SubstitutingSourceProvider( bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false) ) ); bootstrap.addCommand(new RenderCommand()); bootstrap.addBundle(new AssetsBundle()); bootstrap.addBundle(new MigrationsBundle<HelloWorldConfiguration>() { @Override public DataSourceFactory getDataSourceFactory(HelloWorldConfiguration configuration) { return configuration.getDataSourceFactory(); } }); bootstrap.addBundle(hibernateBundle); bootstrap.addBundle(new ViewBundle<HelloWorldConfiguration>() { @Override public Map<String, Map<String, String>> getViewConfiguration(HelloWorldConfiguration configuration) { return configuration.getViewRendererConfiguration(); } }); }
/** * Called by {@link #run(String...)} to add the standard "server" and "check" commands * * @param bootstrap the bootstrap instance */ protected void addDefaultCommands(Bootstrap<T> bootstrap) { bootstrap.addCommand(new ServerCommand<>(this)); bootstrap.addCommand(new CheckCommand<>(this)); }
@Override public void initialize(Bootstrap<MacroBaseConf> bootstrap) { bootstrap.addCommand(new MacroBasePipelineCommand()); }
public void initialize(Bootstrap<ApplicationConfig> configurationBootstrap) { configurationBootstrap.addCommand(new NewCommand()); configurationBootstrap.addCommand(new GenerateCommand()); configurationBootstrap.addCommand(new UsersCommand()); configurationBootstrap.addCommand(new ValidateCommand()); configurationBootstrap.addCommand(new RunCommand()); }
@Override public void initialize(Bootstrap<EmoConfiguration> bootstrap) { bootstrap.addCommand(new CreateKeyspacesCommand()); bootstrap.addCommand(new RegisterCassandraCommand()); bootstrap.addCommand(new ListCassandraCommand()); bootstrap.addCommand(new UnregisterCassandraCommand()); bootstrap.addCommand(new PurgeDatabusEventsCommand()); bootstrap.addCommand(new AllTablesReportCommand()); bootstrap.addCommand(new EncryptConfigurationApiKeyCommand()); EmoServiceObjectMapperFactory.configure(bootstrap.getObjectMapper()); bootstrap.getMetricRegistry().register("jvm.gc.totals", new EmoGarbageCollectorMetricSet()); }
@Override public final void initialize(Bootstrap<?> bootstrap) { final Class<T> klass = Generics.getTypeParameter(getClass(), Configuration.class); bootstrap.addCommand(new FlywayMigrateCommand(this, klass)); }
@Override @SuppressWarnings("unchecked") public void visit(final Class<?> type) { if (FeatureUtils.is(type, Command.class)) { try { final Command cmd; if (EnvironmentCommand.class.isAssignableFrom(type)) { cmd = (Command) type.getConstructor(Application.class) .newInstance(bootstrap.getApplication()); } else { cmd = (Command) type.newInstance(); } commands.add((Class<Command>) type); commandList.add(cmd); bootstrap.addCommand(cmd); LOGGER.debug("Command registered: {}", type.getSimpleName()); } catch (Exception e) { throw new IllegalStateException("Failed to instantiate command: " + type.getSimpleName(), e); } } }
@Override public void initialize(Bootstrap<MapMatchingServerConfiguration> bootstrap) { bootstrap.addBundle(new GraphHopperBundle()); bootstrap.addCommand(new ImportCommand()); bootstrap.addCommand(new MatchCommand()); bootstrap.addCommand(new GetBoundsCommand()); bootstrap.addCommand(new MeasurementCommand()); bootstrap.addBundle(new ConfiguredAssetsBundle("/assets/mapmatching-webapp/", "/app/", "index.html")); }
@Override public final void initialize(final Bootstrap<?> bootstrap) { final Class<T> klass = Generics.getTypeParameter(getClass(), Configuration.class); bootstrap.addCommand(new DbCommand<T>(name(), this, this, klass)); }
@Override public void initialize(Bootstrap<?> bootstrap) { Class<T> configurationClass = (Class<T>) bootstrap.getApplication().getConfigurationClass(); bootstrap.addCommand(new AtlasDbConfiguredCommand<T>(configurationClass)); }
@Override public void initialize(Bootstrap<NewtsConfig> bootstrap) { bootstrap.addCommand(new InitCommand()); bootstrap.addBundle(new AssetsBundle("/app", UI_URL_PATH, "index.html")); }
@Override public void initialize(Bootstrap<NewtsConfig> bootstrap) { bootstrap.addCommand(new InitCommand()); bootstrap.addBundle(new AssetsBundle("/app", UI_URL_PATH, "index.html")); }
@Override @SuppressWarnings("unchecked") public final void initialize(Bootstrap<?> bootstrap) { final Class<T> klass = (Class<T>) bootstrap.getApplication().getConfigurationClass(); bootstrap.addCommand(new DbCommand<>(name(), this, klass, getMigrationsFileName())); }
@Override public void initialize(Bootstrap<GraphHopperServerConfiguration> bootstrap) { bootstrap.addBundle(new GraphHopperBundle()); bootstrap.addBundle(new ConfiguredAssetsBundle("/assets/", "/maps/", "index.html")); bootstrap.addCommand(new ImportCommand(bootstrap.getObjectMapper())); }
@Override public void initialize(Bootstrap<KeystoreConfiguration> bootstrap) { // Enable variable substitution with environment variables bootstrap.setConfigurationSourceProvider( new SubstitutingSourceProvider( bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false) ) ); bootstrap.addCommand(new TLSTruststoreTestCommand<>(this)); }