• Post Reply Bookmark Topic Watch Topic
  • New Topic

parsing data from MQ and passing to other classes  RSS feed

 
K. Merritt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Retrieving an MQ message that contains 3000 + bytes within several hundred variables/fields.

I only need 5 fields from this message. One boss recommends a class that I instantiate, and pass the entire MQ message to then use getters and setters to return the 5 fields I want (parse in this class).

Another person suggests passing the message to a class, creating a collection, then entire collection is passed back.

I researched collections but it appears you always reference individual fields with integer, not field name. Seems awkward for classes to know int position for array/list built in a different class.

Could someone suggest a best practice method for a class that contains the file layout, completes the parsing on the MQ message, and allows some form of return for the individual fields.

Thanks,

K. Merritt
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A HashMap is a name/value pair. Sounds more like what you need.
 
K. Merritt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!