@Context
public class EnvironmentDeploymentContext
extends java.lang.Object
implements com.netflix.config.DeploymentContext, io.micronaut.context.event.ApplicationEventListener<io.micronaut.discovery.event.ServiceReadyEvent>, java.io.Closeable
DeploymentContext
that bridges to the current Environment
.Constructor and Description |
---|
EnvironmentDeploymentContext(EnvironmentConfiguration environment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.String |
getApplicationId() |
java.lang.String |
getDeploymentDatacenter() |
java.lang.String |
getDeploymentEnvironment() |
java.lang.String |
getDeploymentRegion() |
java.lang.String |
getDeploymentServerId() |
java.lang.String |
getDeploymentStack() |
java.lang.String |
getValue(com.netflix.config.DeploymentContext.ContextKey key) |
java.lang.String |
getZone() |
void |
onApplicationEvent(io.micronaut.discovery.event.ServiceReadyEvent event) |
void |
setApplicationId(java.lang.String appId) |
void |
setDeploymentDatacenter(java.lang.String deployedAt) |
void |
setDeploymentEnvironment(java.lang.String env) |
void |
setDeploymentRegion(java.lang.String region) |
void |
setDeploymentServerId(java.lang.String serverId) |
void |
setDeploymentStack(java.lang.String stack) |
void |
setValue(com.netflix.config.DeploymentContext.ContextKey key,
java.lang.String value) |
public EnvironmentDeploymentContext(EnvironmentConfiguration environment)
environment
- environmentpublic java.lang.String getDeploymentEnvironment()
getDeploymentEnvironment
in interface com.netflix.config.DeploymentContext
public void setDeploymentEnvironment(java.lang.String env)
setDeploymentEnvironment
in interface com.netflix.config.DeploymentContext
public java.lang.String getDeploymentDatacenter()
getDeploymentDatacenter
in interface com.netflix.config.DeploymentContext
public void setDeploymentDatacenter(java.lang.String deployedAt)
setDeploymentDatacenter
in interface com.netflix.config.DeploymentContext
public java.lang.String getApplicationId()
getApplicationId
in interface com.netflix.config.DeploymentContext
public void setApplicationId(java.lang.String appId)
setApplicationId
in interface com.netflix.config.DeploymentContext
public void setDeploymentServerId(java.lang.String serverId)
setDeploymentServerId
in interface com.netflix.config.DeploymentContext
public java.lang.String getDeploymentServerId()
getDeploymentServerId
in interface com.netflix.config.DeploymentContext
public java.lang.String getDeploymentStack()
getDeploymentStack
in interface com.netflix.config.DeploymentContext
public java.lang.String getValue(com.netflix.config.DeploymentContext.ContextKey key)
getValue
in interface com.netflix.config.DeploymentContext
public void setValue(com.netflix.config.DeploymentContext.ContextKey key, java.lang.String value)
setValue
in interface com.netflix.config.DeploymentContext
public void setDeploymentStack(java.lang.String stack)
setDeploymentStack
in interface com.netflix.config.DeploymentContext
public java.lang.String getDeploymentRegion()
getDeploymentRegion
in interface com.netflix.config.DeploymentContext
public java.lang.String getZone()
public void setDeploymentRegion(java.lang.String region)
setDeploymentRegion
in interface com.netflix.config.DeploymentContext
public void onApplicationEvent(io.micronaut.discovery.event.ServiceReadyEvent event)
onApplicationEvent
in interface io.micronaut.context.event.ApplicationEventListener<io.micronaut.discovery.event.ServiceReadyEvent>
@PreDestroy public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException