public class Environment extends Object
Constructor and Description |
---|
Environment(String name,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
javax.validation.Validator validator,
com.codahale.metrics.MetricRegistry metricRegistry,
ClassLoader classLoader)
Creates a new environment.
|
Modifier and Type | Method and Description |
---|---|
AdminEnvironment |
admin()
Returns the application's
AdminEnvironment . |
MutableServletContextHandler |
getAdminContext() |
MutableServletContextHandler |
getApplicationContext() |
ExecutorService |
getHealthCheckExecutorService()
Returns an
ExecutorService to run time bound health checks |
javax.servlet.Servlet |
getJerseyServletContainer() |
String |
getName()
Returns the application's name.
|
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Returns the application's
ObjectMapper . |
javax.validation.Validator |
getValidator()
Returns the application's
Validator . |
com.codahale.metrics.health.HealthCheckRegistry |
healthChecks()
Returns the application's
HealthCheckRegistry . |
JerseyEnvironment |
jersey()
Returns the application's
JerseyEnvironment . |
LifecycleEnvironment |
lifecycle()
Returns the application's
LifecycleEnvironment . |
com.codahale.metrics.MetricRegistry |
metrics()
Returns the application's
MetricRegistry . |
ServletEnvironment |
servlets()
Returns the application's
ServletEnvironment . |
void |
setValidator(javax.validation.Validator validator)
Sets the application's
Validator . |
public Environment(String name, com.fasterxml.jackson.databind.ObjectMapper objectMapper, javax.validation.Validator validator, com.codahale.metrics.MetricRegistry metricRegistry, ClassLoader classLoader)
name
- the name of the applicationobjectMapper
- the ObjectMapper
for the applicationpublic JerseyEnvironment jersey()
JerseyEnvironment
.public ExecutorService getHealthCheckExecutorService()
ExecutorService
to run time bound health checkspublic AdminEnvironment admin()
AdminEnvironment
.public LifecycleEnvironment lifecycle()
LifecycleEnvironment
.public ServletEnvironment servlets()
ServletEnvironment
.public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
ObjectMapper
.public String getName()
public javax.validation.Validator getValidator()
Validator
.public void setValidator(javax.validation.Validator validator)
Validator
.public com.codahale.metrics.MetricRegistry metrics()
MetricRegistry
.public com.codahale.metrics.health.HealthCheckRegistry healthChecks()
HealthCheckRegistry
.public MutableServletContextHandler getApplicationContext()
public javax.servlet.Servlet getJerseyServletContainer()
public MutableServletContextHandler getAdminContext()
Copyright © 2015. All rights reserved.