Re: [Quickfix-developers] Logon question
Brought to you by:
orenmnero
From: Dale W. <wi...@oc...> - 2009-07-08 20:53:33
|
That's the correct way to do it, Ron. A minor detail -- there is no need to cast the message type. You can add the additional fields directly to the message object. The good news is you are only examining the admin messages and they are quite rare on an active system, so there's very little overhead in this approach. Dale Wilson Principal Software Engineer Object Computing, Inc. Franssen, Ron wrote: > > I have a question about adding additional information to the logon > message. Using an example application as a guide, we are currently > adding the username/password combination to the logon message by the > following means: > > In the*/ toAdmin/* event handler, we are checking for the message type > to be equal to "A" (logon). If the message type is a logon message, > then we cast it to a logon message type and then proceed to perform: > > logonMessage.setField(username) > logonMessage.setField(password) > > where username and password are QuickFix type objects. > > This whole process seems to be working, but is feels sloppy to me. Is > there a better way of hooking the logon event without subjecting every > single message to an interrogation to determine if it is a logon > message type. > > Thanks, > > Ron Franssen > Koch Supply & Trading > |