Class EnvironmentCallbackAnnotation

java.lang.Object
com.azure.runtime.host.resources.annotations.EnvironmentCallbackAnnotation
All Implemented Interfaces:
ResourceAnnotation
Direct Known Subclasses:
EnvironmentAnnotation

public class EnvironmentCallbackAnnotation extends Object implements ResourceAnnotation
Represents an annotation that provides a callback to modify the environment variables of an application.
  • Constructor Details

    • EnvironmentCallbackAnnotation

      public EnvironmentCallbackAnnotation(String name, Supplier<String> supplier)
      Initializes a new instance of the EnvironmentCallbackAnnotation class with the specified name and callback function.
      Parameters:
      name - The name of the environment variable to set.
      supplier - The callback function that returns the value to set the environment variable to.
    • EnvironmentCallbackAnnotation

      public EnvironmentCallbackAnnotation(String debugHint, Consumer<EnvironmentCallbackContext> callback)
      Initializes a new instance of the EnvironmentCallbackAnnotation class with the specified callback.
      Parameters:
      callback - The callback to be invoked.
  • Method Details