CustomVariableProvider
Stay organized with collections
Save and categorize content based on your preferences.
Callback that is provided by the application to provide a custom variable.
Public Methods
public abstract String getValue (Map<String, Object>
parameters)
getValue(Map)
is given a map of named parameters (the map may contain
String, Double, Boolean, Map, or List values). It should return a String which is the
calculated value of the variable.
This function will be called from a background thread during event processing. The
container will cache one instance of this object and reuse it.
Returns
- the value of the custom variable requested
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`CustomVariableProvider` is an interface used by applications to provide custom variable values."],["It includes a `getValue` method that accepts a map of parameters (String, Double, Boolean, Map, or List) and returns a calculated String value."],["The `getValue` method is executed on a background thread and its return value represents the custom variable's value."],["The container maintains a single instance of the `CustomVariableProvider` for reuse."]]],["The `CustomVariableProvider` interface allows applications to define custom variables. It includes a `getValue` method that receives a map of named parameters, which can be strings, doubles, booleans, maps, or lists. This method calculates and returns a string representing the custom variable's value. The `getValue` method is executed on a background thread, and the container caches and reuses an instance of the provider.\n"]]