Action | Description |
getSchema() | During startup, the currency converter calls this action to obtain the sequence of field names that the currency converter needs to store in its cache. These are the values that the currency converter uses to normalize all symbols to a base currency. The default is that this action returns a sequence that contains the single entry "VALUE". If the extension is to supply more than one value then you must override this action to return all required field names. Also, you must call the currency converter setCustomValue() action for each additional value you need from the extension. See Getting values from the currency converter. |
onRegistered() | When startup is complete the currency converter calls this action, which provides the calculation extension with the currency converter interface that the extension uses to provide values. |
refresh() | The currency converter calls this action each time it wants the latest values from the calculation extension. The setting of the currency converter's CONFIG_UPDATE_TIMEOUT configuration parameter determines how often the currency converter calls this action. The default is 0.5, which means that the extension provides the latest data every half second. This happens automatically and the currency converter does not need to explicitly invoke the refresh() action. If the setting of the currency converter's CONFIG_UPDATE_TIMEOUT parameter is 0.0 then refresh() is not automatically called and the extension is expected to provide values when it can, either constantly or on its own timer. |
addSymbol() | The currency converter calls this action after startup for all possible combinations of symbols that the currency converter has been configured to supply values for. It is not expected that the extension can provide values for all configured symbols but it is expected to do its best. For example, if the currency converter has been configured to supply a value to convert from GBP to EUR, addSymbol() will be called for both "GBP/EUR" and "EUR/GBP", but the extension might only be able to supply values for "GBP/EUR". The addSymbol() action can also be called any time the parameters for the currency converter have been updated and a new symbol is required. |
removeSymbol() | The currency converter calls this action after startup if it no longer needs data for a particular symbol. |