io.vertx.reactivex.ext.web.common

## Class WebEnvironment

- java.lang.Object
- - io.vertx.reactivex.ext.web.common.WebEnvironment

-     public class WebEnvironment
      extends Object

  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 RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<WebEnvironment>` | `__TYPE_ARG`
    `static String` | `ENV_VARIABLE_NAME`
    `static String` | `SYSTEM_PROPERTY_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebEnvironment(Object delegate)`
    `WebEnvironment(WebEnvironment delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `development()` Will return true if the mode is not null and equals ignoring case the string "dev"
    `boolean` | `equals(Object o)`
    `WebEnvironment` | `getDelegate()`
    `int` | `hashCode()`
    `static String` | `mode()` The current mode from the system properties with fallback to environment variables
    `static WebEnvironment` | `newInstance(WebEnvironment arg)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<WebEnvironment> __TYPE_ARG

    - #### SYSTEM_PROPERTY_NAME

          public static final String SYSTEM_PROPERTY_NAME

      See Also:
        Constant Field Values

    - #### ENV_VARIABLE_NAME

          public static final String ENV_VARIABLE_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### WebEnvironment

          public WebEnvironment(WebEnvironment delegate)

    - #### WebEnvironment

          public WebEnvironment(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public WebEnvironment getDelegate()

    - #### 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

          public static String mode()

      The current mode from the system properties with fallback to environment variables
      Returns:
        String with mode value or null

    - #### newInstance

          public static WebEnvironment newInstance(WebEnvironment arg)

Copyright © 2023 Eclipse. All rights reserved.