Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Analytics : Creating and configuring a currency converter : Configuring currency converter instances : Setting currency converter instance parameters
Setting currency converter instance parameters
When you create a currency converter instance it has the same configuration parameter settings as the currency converter factory you use to create it. Each currency converter configuration parameter has a default setting, which is appropriate for the most common currency converter use cases. You only need to set currency converter parameters if the default settings do not meet your application requirements.
There are many configuration parameters that you can set to specify the behavior of a currency converter. The constant values used to specify these configuration parameters are defined in com.apama.ccyconverter.Consts. See also Descriptions of currency converter parameters.
To set a configuration parameter for a particular currency converter instance, execute the com.apama.ccyconverter.CurrencyConverter.setParams() action on the currency converter instance. Alternatively, you can set the configuration parameter on a currency converter factory instance and then use that factory instance to create the currency converter. See Setting currency converter factory parameters.
To set parameters on a currency converter instance:
1. Use a currency converter factory to create a currency converter instance. For example:
com.apama.ccyconverter.CurrencyConverter cc :=
(new com.apama.ccyconverter.CurrencyConverterFactory).
create(mainContext, "myCurrencyConverter",
(new BBAMidPriceExtension).create(sHandler));
2. Create a com.apama.utils.Params object.
3. Add a parameter name/value pair to the parameters object you created.
4. Repeat the previous step for each parameter you want to set.
5. Execute the setParams() action on the currency converter instance and pass it the Params object you created.
The new parameter settings affect subsequent requests sent to the currency converter.
To obtain the values for any configuration parameters that have been explicitly set, either on the factory that created the currency converter instance or on the instance itself, execute the CurrencyConverter.getParams() action. This action does not return values for parameters that have the default setting.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback