Closed swarwick closed 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?
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
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.
Can I get a response back?
Hi all, let's merge current version
See issue #42