Package io.vertx.mutiny.ext.web.common
Class WebEnvironment
java.lang.Object
io.vertx.mutiny.ext.web.common.WebEnvironment
- All Implemented Interfaces:
MutinyDelegate
Utility API to verify which environment is the web application running.
The utility will check initially for the existence of a system property under the name `vertx.mode`,
if there is no such property then it will look under the environment variables under the name `VERTX_MODE`.
This value will be then used when the API is invoked. By itself this utility will not
affect the behavior of your application, however you can use it to simplify your handlers, e.g.:
When the development mode is active you can log more information or disable caches.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Paulo Lopes
- See Also:
-
WebEnvironment
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<WebEnvironment>static final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionWebEnvironment(io.vertx.ext.web.common.WebEnvironment delegate) Create a new instance ofWebEnvironmentdelegating to the given (non-null) instance ofWebEnvironment.WebEnvironment(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanWill return true if the mode is not null and equals ignoring case the string "dev"booleanio.vertx.ext.web.common.WebEnvironmentGet the delegate instance.inthashCode()static Stringmode()The current mode from the system properties with fallback to environment variablesstatic WebEnvironmentnewInstance(io.vertx.ext.web.common.WebEnvironment delegate) Creates a new instance of theWebEnvironment.toString()
-
Field Details
-
SYSTEM_PROPERTY_NAME
- See Also:
-
ENV_VARIABLE_NAME
- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
WebEnvironment
public WebEnvironment(io.vertx.ext.web.common.WebEnvironment delegate) Create a new instance ofWebEnvironmentdelegating to the given (non-null) instance ofWebEnvironment. -
WebEnvironment
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.common.WebEnvironment getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
development
public static boolean development()Will return true if the mode is not null and equals ignoring case the string "dev"- Returns:
- always boolean
-
mode
The current mode from the system properties with fallback to environment variables- Returns:
- String with mode value or null
-
newInstance
Creates a new instance of theWebEnvironment. -
hashCode
public int hashCode() -
equals
-
toString
-