epam / java-cme-mdp3-handler

Java Market Data Handler for CME Market Data (MDP 3.0)
GNU Lesser General Public License v3.0
75 stars 31 forks source link

See issue #42 #44

Closed swarwick closed 6 years ago

swarwick commented 6 years ago

See issue #42

kolybelkin commented 6 years ago

Considering the interface com.epam.cme.mdp3.ChannelListener, which end user implements, we don't have neither AbstractFieldSet nor SbeMessage in these interfaces. There are the instances of these objects there in fact but user is supposed to use instanceof and cast.

There are MdpMessage and FieldSet interfaces that are provided to end user, so I would move metadata method to those ones.

@swarwick What do you think? do you use metadata now in your user code? Could you please show an example?

swarwick commented 6 years ago

We are using it to build a type map and also a schema based on the XML file that this code already reads in and parses... something like:

            MdpMessageTypes mdpMessageTypes = new MdpMessageTypes(uri);
            for (MdpMessageType msgType : mdpMessageTypes.getMessageTypes()) {
                if (msgType != null) {
                                      msgType.getMetadataContainer().allGroups()
                                      msgType.getMetadataContainer().allFields()

using the fields and groups to create the type map and schema for our system

swarwick commented 6 years ago

The MdpMessageTypes is open an available to use event though its not part of the specific data parsing its actually useful for setup of structures. The MetadataContainer seems to be only implemented by ArrayMetadataContainer and it has well defined classes for fieldtypes and groupTypes. Also the classes already have findField and hasfield which return the same as just getting an array of all fields.

swarwick commented 6 years ago

Can I get a response back?

iamolever commented 6 years ago

Hi all, let's merge current version