use of io.cryostat.core.sys.Environment in project cryostat by cryostatio.
the class Cryostat method main.
public static void main(String[] args) throws Exception {
CryostatCore.initialize();
Security.addProvider(BouncyCastleProviderSingleton.getInstance());
final Logger logger = Logger.INSTANCE;
final Environment environment = new Environment();
logger.trace("env: {}", environment.getEnv().toString());
logger.info("{} started.", System.getProperty("java.rmi.server.hostname", "cryostat"));
Client client = DaggerCryostat_Client.builder().build();
CompletableFuture<Void> future = new CompletableFuture<>();
client.httpServer().addShutdownListener(() -> future.complete(null));
client.credentialsManager().load();
client.ruleRegistry().loadRules();
client.vertx().deployVerticle(client.httpServer(), new DeploymentOptions(), res -> logger.info("HTTP Server Verticle Started"));
client.vertx().deployVerticle(client.webServer(), new DeploymentOptions().setWorker(true), res -> logger.info("WebServer Verticle Started"));
client.vertx().deployVerticle(client.messagingServer(), new DeploymentOptions(), res -> logger.info("MessagingServer Verticle Started"));
client.vertx().deployVerticle(client.ruleProcessor(), new DeploymentOptions().setWorker(true), res -> logger.info("RuleProcessor Verticle Started"));
client.platformClient().start();
client.recordingMetadataManager().load();
future.join();
}
Aggregations