Annotation Interface EnvironmentListener


@Target(METHOD) @Retention(RUNTIME) public @interface EnvironmentListener
Annotation for methods intended to listen to changes in the Environment. Methods annotated with @EnvironmentListener will be called in response to each Environment.set(String, Object) invocation that affects the specified environment key. Annotated methods must adhere to the following constraints:
  • Must be public.
  • Must return void.
  • Must have exactly one argument (the value corresponding to the environment key of interest).
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the key from Environment to be used as the method argument.
  • Element Details

    • value

      String value
      Specifies the key from Environment to be used as the method argument.
      Returns:
      The key of the environment.
      Default:
      ""