Search in sources :

Example 1 with EurekaServerStartedEvent

use of org.springframework.cloud.netflix.eureka.server.event.EurekaServerStartedEvent in project spring-cloud-netflix by spring-cloud.

the class EurekaServerInitializerConfiguration method start.

@Override
public void start() {
    new Thread(new Runnable() {

        @Override
        public void run() {
            try {
                // TODO: is this class even needed now?
                eurekaServerBootstrap.contextInitialized(EurekaServerInitializerConfiguration.this.servletContext);
                log.info("Started Eureka Server");
                publish(new EurekaRegistryAvailableEvent(getEurekaServerConfig()));
                EurekaServerInitializerConfiguration.this.running = true;
                publish(new EurekaServerStartedEvent(getEurekaServerConfig()));
            } catch (Exception ex) {
                // Help!
                log.error("Could not initialize Eureka servlet context", ex);
            }
        }
    }).start();
}
Also used : EurekaRegistryAvailableEvent(org.springframework.cloud.netflix.eureka.server.event.EurekaRegistryAvailableEvent) EurekaServerStartedEvent(org.springframework.cloud.netflix.eureka.server.event.EurekaServerStartedEvent)

Aggregations

EurekaRegistryAvailableEvent (org.springframework.cloud.netflix.eureka.server.event.EurekaRegistryAvailableEvent)1 EurekaServerStartedEvent (org.springframework.cloud.netflix.eureka.server.event.EurekaServerStartedEvent)1