com.netflix.karyon.server.lifecycle
Class ServerInitializer

java.lang.Object
  extended by com.netflix.karyon.server.lifecycle.ServerInitializer
All Implemented Interfaces:
java.io.Closeable

public class ServerInitializer
extends java.lang.Object
implements java.io.Closeable

This class holds the karyon initialization logic that constitutes of the following:

This also provides a Closeable.close() to cleanup upon shutdown.


Constructor Summary
ServerInitializer(EurekaHandler eurekaHandler, ApplicationFinder applicationFinder, ComponentFinder componentFinder)
           
 
Method Summary
 void close()
          Marks the application as down in eureka.
 void initialize(com.google.inject.Injector injector)
          Initializes karyon which is to instantiate applications and components defined in the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerInitializer

@Inject
public ServerInitializer(EurekaHandler eurekaHandler,
                                ApplicationFinder applicationFinder,
                                ComponentFinder componentFinder)
Method Detail

initialize

public void initialize(com.google.inject.Injector injector)
Initializes karyon which is to instantiate applications and components defined in the classpath.

Parameters:
injector - Injector used to initialize Governator

close

public void close()
Marks the application as down in eureka.

Specified by:
close in interface java.io.Closeable