question

Upvotes
Accepted
1 0 0 0

How to read Context Properties.

I am using rfaconfig.xml to initialize Context using

Context.initialize();

Now, I would like to downloadDictionary from server if configured value is false. Is there any way to read that property using Context.


<entry key="connectionType" value="RSSL" />

<entry key="downloadDataDict" value="false" />

<entry key="downloadFullMarketFeedDataDict" value="false" />

Appreciate your help.

treprfarfa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
20.3k 73 10 20

Hi @vikas.chaudhary

The downloadDataDict and downloadFullMarketDataDict are API level config parameters - not application level and apply to SSLED and SASS3 type connections. For these types of connections, the API would read the parameter to determine whether it needs to download the dictionary (or use local files)

For an RSSL type connection, as you are rightly trying to implement, the application needs to determine whether it wants to download or use local - NOT the API. Therefore any such parameter controlling this behaviour would be an application-level parameter - which you can pass to the application how you wish.

As you may know, the RFA Java API uses the standard Java Preferences library - and does not directly read any XML file. As detailed in the RFAJ_ConfigLoggingGuide.pdf (which is included in the RFA Java SDK Docs folder).

We do provide the config editor/import/export tools (in the Tools directory) - to make it easier for you to populate the relevant Java Preferences trees used by RFA for its API level config. You can also use the standard Java function to import any config file e.g

java.util.prefs.Preferences.importPreferences(InputStream)

You can find fuller details of how the config is implemented, as well as the list of API level parameter in the above-mentioned pdf file.

You may also notice that most of our examples use the command line to specify application-level parameters e.g. the fileDictionary parameter which determines if the application will use local file dictionaries or download them.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
11.5k 16 7 10

Hello @vikas.chaudhary

You can find more detail regarding how to load dictionary from local files or Refinitiv Real-Time via the following RFA Java tutorials:

  • Tutorial 7 - Loading Data Dictionaries from the file system
  • Tutorial 10 - Downloading the Data Dictionaries
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea