@Override public void start(StartContext context) { this.service.get().registerListener(this); for (Deployment deployment : this.host.get().getDeployments()) { this.addDeployment(deployment); } this.registry.accept(this); }
@Override public void start(StartContext context) { UndertowService service = this.configuration.getUndertowService(); ContainerEventHandler eventHandler = this.configuration.getContainerEventHandler(); this.connector = new UndertowConnector(this.configuration.getListener()); this.serverName = this.configuration.getServer().getName(); this.server = new UndertowServer(this.serverName, service, this.connector); // Register ourselves as a listener to the container events service.registerListener(this); // Initialize mod_cluster and start it now eventHandler.init(this.server); eventHandler.start(this.server); // Start the periodic STATUS thread ThreadGroup group = new ThreadGroup(UndertowEventHandlerAdapterService.class.getSimpleName()); ThreadFactory factory = doPrivileged(new PrivilegedAction<ThreadFactory>() { @Override public ThreadFactory run() { return new JBossThreadFactory(group, Boolean.FALSE, null, "%G - %t", null, null); } }); this.executor = Executors.newScheduledThreadPool(1, factory); this.executor.scheduleWithFixedDelay(this, 0, this.configuration.getStatusInterval().toMillis(), TimeUnit.MILLISECONDS); this.configuration.getSuspendController().registerActivity(this); }
@Override public void start(StartContext startContext) throws StartException { runtimeState.setHttpHost(getConnectionURL()); eventListener = new CamelUndertowEventListener(); injectedUndertowService.getValue().registerListener(eventListener); undertowHost = new WildFlyUndertowHost(injectedDefaultHost.getValue()); }