Injector injector =
settingsInjector.createChildInjector(new ServerModule(enableFederation, listenerCount,
waveletLoadCount, deltaPersistCount, storageContinuationCount, lookupCount),
new RobotApiModule(), federationModule, persistenceModule, searchModule);
ServerRpcProvider server = injector.getInstance(ServerRpcProvider.class);
WaveBus waveBus = injector.getInstance(WaveBus.class);
String domain =
injector.getInstance(Key.get(String.class, Names.named(CoreSettings.WAVE_SERVER_DOMAIN)));
if (!ParticipantIdUtil.isDomainAddress(ParticipantIdUtil.makeDomainAddress(domain))) {
throw new WaveServerException("Invalid wave domain: " + domain);
}
initializeServer(injector, domain);
initializeServlets(injector, server);
initializeRobotAgents(injector, server);
initializeRobots(injector, waveBus);
initializeFrontend(injector, server, waveBus);
initializeFederation(injector);
initializeSearch(injector, waveBus);
LOG.info("Starting server");
server.startWebSocketServer(injector);
}