@Context public class EnvironmentDeploymentContext extends Object implements com.netflix.config.DeploymentContext, ApplicationEventListener<ServiceStartedEvent>, Closeable
DeploymentContext
that bridges to the current Environment
.Constructor and Description |
---|
EnvironmentDeploymentContext(EnvironmentConfiguration environment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getApplicationId() |
String |
getDeploymentDatacenter() |
String |
getDeploymentEnvironment() |
String |
getDeploymentRegion() |
String |
getDeploymentServerId() |
String |
getDeploymentStack() |
String |
getValue(com.netflix.config.DeploymentContext.ContextKey key) |
String |
getZone() |
void |
onApplicationEvent(ServiceStartedEvent event)
Handle an application event.
|
void |
setApplicationId(String appId) |
void |
setDeploymentDatacenter(String deployedAt) |
void |
setDeploymentEnvironment(String env) |
void |
setDeploymentRegion(String region) |
void |
setDeploymentServerId(String serverId) |
void |
setDeploymentStack(String stack) |
void |
setValue(com.netflix.config.DeploymentContext.ContextKey key,
String value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supports
public EnvironmentDeploymentContext(EnvironmentConfiguration environment)
environment
- environmentpublic String getDeploymentEnvironment()
getDeploymentEnvironment
in interface com.netflix.config.DeploymentContext
public void setDeploymentEnvironment(String env)
setDeploymentEnvironment
in interface com.netflix.config.DeploymentContext
public String getDeploymentDatacenter()
getDeploymentDatacenter
in interface com.netflix.config.DeploymentContext
public void setDeploymentDatacenter(String deployedAt)
setDeploymentDatacenter
in interface com.netflix.config.DeploymentContext
public String getApplicationId()
getApplicationId
in interface com.netflix.config.DeploymentContext
public void setApplicationId(String appId)
setApplicationId
in interface com.netflix.config.DeploymentContext
public void setDeploymentServerId(String serverId)
setDeploymentServerId
in interface com.netflix.config.DeploymentContext
public String getDeploymentServerId()
getDeploymentServerId
in interface com.netflix.config.DeploymentContext
public String getDeploymentStack()
getDeploymentStack
in interface com.netflix.config.DeploymentContext
public String getValue(com.netflix.config.DeploymentContext.ContextKey key)
getValue
in interface com.netflix.config.DeploymentContext
public void setValue(com.netflix.config.DeploymentContext.ContextKey key, String value)
setValue
in interface com.netflix.config.DeploymentContext
public void setDeploymentStack(String stack)
setDeploymentStack
in interface com.netflix.config.DeploymentContext
public String getDeploymentRegion()
getDeploymentRegion
in interface com.netflix.config.DeploymentContext
public String getZone()
public void setDeploymentRegion(String region)
setDeploymentRegion
in interface com.netflix.config.DeploymentContext
public void onApplicationEvent(ServiceStartedEvent event)
ApplicationEventListener
onApplicationEvent
in interface ApplicationEventListener<ServiceStartedEvent>
event
- the event to respond to@PreDestroy public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException