Re: [Quickfix-developers] Message creation
Brought to you by:
orenmnero
From: <OM...@th...> - 2003-01-03 20:42:00
|
>> It would be nice if the Message constructor (taking a String value) could >> do this automatically. In order to this, I needed to make the >> Message.initFromString(String str) method public instead of protected. >> Is this a reasonable request? Or is there an easier way to create a >> message object? I'm not sure how the message constructor can do this automatically. Once in the constructor you are already creating a message object and not one of the derived objects you need. Am I misunderstanding you? Do you mean maybe to have a create method on the MessageFactory that takes in a string? In any case you do not need to make initFromString public as there already is a public method called fromString. initFromString is designed to be called from constructors because it creates an underlying C++ class. >> Another related question is what happens if you request a message (via >> sequence number) from the MessageStore but it doesn't exists? I'm going to >> have the client basically ask for all messages since (lastMsgRecvd + 1). Depends on which method you use. If you use the signature for requesting one message, it will return false if not available. If you use the method for requesting a range, it will return a collection with whatever is available. So if you have 1-50, and ask for 30-60, you will get 30-50. |