com.netflix.adminresources
Class AdminResourcesContainer

java.lang.Object
  extended by com.netflix.adminresources.AdminResourcesContainer

@Component(disableProperty="netflix.platform.admin.resources.disable")
public class AdminResourcesContainer
extends java.lang.Object

This class starts an embedded jetty server, listening at port specified by property CONTAINER_LISTEN_PORT and defaulting to LISTEN_PORT_DEFAULT.
The embedded server uses jersey so any jersey resources available in packages specified via properties JERSEY_CORE_PACKAGES and JERSEY_APP_PACKAGES will be scanned and initialized.
This server does not use guice/governator to initialize jersey resources as guice has an open issue which makes it difficult to have multiple com.google.inject.servlet.GuiceFilter in the same JVM. Karyon admin starts in an embedded container to have a "always available" endpoint for any application. This helps in a homogeneous admin view for all applications.

Available resources

The following resources are available by default:


Field Summary
static java.lang.String CONTAINER_LISTEN_PORT
           
static com.netflix.config.DynamicStringProperty DEFAULT_PAGE
           
static java.lang.String DEFAULT_PAGE_PROP_NAME
           
static java.lang.String JERSEY_APP_PACKAGES
           
static java.lang.String JERSEY_CORE_PACKAGES
           
static java.lang.String JERSEY_CORE_PACKAGES_DEAULT
           
static int LISTEN_PORT_DEFAULT
           
 
Constructor Summary
AdminResourcesContainer(com.netflix.karyon.server.eureka.HealthCheckInvocationStrategy healthCheckInvocationStrategy)
           
 
Method Summary
 void init()
          Starts the container and hence the embedded jetty server.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PAGE_PROP_NAME

public static final java.lang.String DEFAULT_PAGE_PROP_NAME
See Also:
Constant Field Values

DEFAULT_PAGE

public static final com.netflix.config.DynamicStringProperty DEFAULT_PAGE

CONTAINER_LISTEN_PORT

public static final java.lang.String CONTAINER_LISTEN_PORT
See Also:
Constant Field Values

LISTEN_PORT_DEFAULT

public static final int LISTEN_PORT_DEFAULT
See Also:
Constant Field Values

JERSEY_CORE_PACKAGES

public static final java.lang.String JERSEY_CORE_PACKAGES
See Also:
Constant Field Values

JERSEY_CORE_PACKAGES_DEAULT

public static final java.lang.String JERSEY_CORE_PACKAGES_DEAULT
See Also:
Constant Field Values

JERSEY_APP_PACKAGES

public static final java.lang.String JERSEY_APP_PACKAGES
See Also:
Constant Field Values
Constructor Detail

AdminResourcesContainer

@Inject
public AdminResourcesContainer(com.netflix.karyon.server.eureka.HealthCheckInvocationStrategy healthCheckInvocationStrategy)
Method Detail

init

@PostConstruct
public void init()
          throws java.lang.Exception
Starts the container and hence the embedded jetty server.

Throws:
java.lang.Exception - if there is an issue while starting the server

shutdown

@PreDestroy
public void shutdown()