public abstract class AbstractEnvironmentDetector extends AbstractLoggableComponent implements EnvironmentDetector
EnvironmentDetector
.ENVIRONMENT_TYPE_ACCEPTANCE, ENVIRONMENT_TYPE_DEVELOPMENT, ENVIRONMENT_TYPE_PRE_PRODUCTION, ENVIRONMENT_TYPE_PRODUCTION, ENVIRONMENT_TYPE_STAGING, ENVIRONMENT_TYPE_TEST
Constructor and Description |
---|
AbstractEnvironmentDetector()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isDevelopmentEnvironment() |
boolean |
isEnvironmentCloseToProduction() |
boolean |
isProductionEnvironment() |
protected void |
logEnvironmentStatus()
Logs the current environment status information.
|
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEnvironmentType
public AbstractEnvironmentDetector()
public boolean isDevelopmentEnvironment()
isDevelopmentEnvironment
in interface EnvironmentDetector
EnvironmentDetector.getEnvironmentType()
.equals(
EnvironmentDetector.ENVIRONMENT_TYPE_DEVELOPMENT
)
.public boolean isProductionEnvironment()
isProductionEnvironment
in interface EnvironmentDetector
EnvironmentDetector.getEnvironmentType()
.equals(
EnvironmentDetector.ENVIRONMENT_TYPE_PRODUCTION
)
.public boolean isEnvironmentCloseToProduction()
isEnvironmentCloseToProduction
in interface EnvironmentDetector
true
if the environment type
is EnvironmentDetector.ENVIRONMENT_TYPE_PRODUCTION
or close to production such as EnvironmentDetector.ENVIRONMENT_TYPE_PRE_PRODUCTION
,
EnvironmentDetector.ENVIRONMENT_TYPE_ACCEPTANCE
, or EnvironmentDetector.ENVIRONMENT_TYPE_STAGING
.protected void logEnvironmentStatus()
Copyright © 2001–2016 mmm-Team. All rights reserved.