Thread: [Quickfix-developers] Using custom defined dictionaries and classes
Brought to you by:
orenmnero
|
From: Michael L. <mly...@gm...> - 2005-08-11 12:58:51
|
Hi, i have a question about using custom defined classes with Session=20 initiators. I am trying to host multiple connections on one process for=20 order entry and If i generate classes from an XML spec file it will only=20 seem to want to use that at the session level if that class package is name= d=20 quickfix.fix42 or quickfix.fix43 but it i name it quickfix.fix42.custom and= =20 try to cast a logon to a custom.logon i will get a classs cast exception, i= s=20 there any way to tell the session which package to use or does it just go b= y=20 what the begin string is called? On 8/10/05, qui...@li... < qui...@li...> wrote: >=20 > Send Quickfix-developers mailing list submissions to > qui...@li... >=20 > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > or, via email, send a message with subject or body 'help' to > qui...@li... >=20 > You can reach the person managing the list at > qui...@li... >=20 > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Quickfix-developers digest..." >=20 >=20 > QuickFIX Documentation:=20 > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html >=20 >=20 >=20 > Today's Topics: >=20 > 1. Fill SessionSettings programmatically? (Andrei Goldchleger) >=20 > --__--__-- >=20 > Message: 1 > Date: Wed, 10 Aug 2005 18:07:48 -0300 > From: Andrei Goldchleger <an...@gm...> > To: qui...@li... > Subject: [Quickfix-developers] Fill SessionSettings programmatically? >=20 > Hi all, >=20 > Is there any way to programmatically populate a SessionSettings > object? That is, I would like to configure my Initiator without > resorting to the configuration file. Can this be accomplished in any > way? >=20 > Thanks, >=20 > Andrei Goldchleger >=20 >=20 >=20 > --__--__-- >=20 > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers >=20 >=20 > End of Quickfix-developers Digest >=20 --=20 Michael Lyszczek 1 North End Ave Suite 1321 New York, NY, 10282 NEW EMAIL : ml...@fl... |
|
From: Joerg T. <Joe...@ma...> - 2005-08-11 14:25:58
|
Hi Michael,
> Hi, i have a question about using custom defined classes with Session
> initiators. I am trying to host multiple connections on one process for
> order entry and If i generate classes from an XML spec file it will only
> seem to want to use that at the session level if that class package is named
> quickfix.fix42 or quickfix.fix43 but it i name it quickfix.fix42.custom and
> try to cast a logon to a custom.logon i will get a classs cast exception, is
> there any way to tell the session which package to use or does it just go by
> what the begin string is called?
Actually, the XML generation is neither bullet-proof nor complete at the moment.
I guess you are using Java so you might give QuickFIX/J a try where the class
generation using XML is more complete.
If I understood you right, you want to tell QF that if it receives a string of the form
"BeginString=FIX.4.2|...|35=A|..."
then it should create an object with the class quickfix.fix42.custom.Logon instead of
quickfix.fix42.Logon. Here you could use a MessageFactory. Have a look at the code of the
DefaultMessageFactory for Java, and create your own one. If you setup the QF application,
you can specify your message factory.
On the other hand, if you need just one or two extra fields in the custom message, it may
be simpler to pull them out using message.getField(SomeField.FIELD), where SomeField could
a Field already defined by QF or a custom field.
Cheers, Jörg
--
Joerg Thoennes
http://macd.com
Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH
Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen
|
|
From: Oren M. <or...@qu...> - 2005-08-15 17:23:54
|
You need to implement an instance of the MessageFactory instead of using =
the DefaultMessageFactory. This factory is what the engine uses to =
create a message with the correct class type after reading it off the =
stream. If your type is not found in the factory, QuickFIX just creates =
a generic Message class, so your cast will fail when you try to crack =
it.
--oren
----- Original Message -----=20
From: Michael Lyszczek=20
To: qui...@li...=20
Sent: Thursday, August 11, 2005 7:58 AM
Subject: [Quickfix-developers] Using custom defined dictionaries and =
classes
Hi, i have a question about using custom defined classes with Session =
initiators. I am trying to host multiple connections on one process for =
order entry and If i generate classes from an XML spec file it will only =
seem to want to use that at the session level if that class package is =
named quickfix.fix42 or quickfix.fix43 but it i name it =
quickfix.fix42.custom and try to cast a logon to a custom.logon i will =
get a classs cast exception, is there any way to tell the session which =
package to use or does it just go by what the begin string is called?
On 8/10/05, qui...@li... < =
qui...@li...> wrote:
Send Quickfix-developers mailing list submissions to=20
qui...@li...
To subscribe or unsubscribe via the World Wide Web, visit =
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
or, via email, send a message with subject or body 'help' to
qui...@li...=20
You can reach the person managing the list at
qui...@li...
When replying, please edit your Subject line so it is more specific=20
than "Re: Contents of Quickfix-developers digest..."
QuickFIX Documentation: =
http://www.quickfixengine.org/quickfix/doc/html/index.html=20
QuickFIX FAQ: =
http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html
Today's Topics:
1. Fill SessionSettings programmatically? (Andrei Goldchleger)
--__--__--
Message: 1
Date: Wed, 10 Aug 2005 18:07:48 -0300=20
From: Andrei Goldchleger <an...@gm...>
To: qui...@li...
Subject: [Quickfix-developers] Fill SessionSettings =
programmatically?=20
Hi all,
Is there any way to programmatically populate a SessionSettings
object? That is, I would like to configure my Initiator without
resorting to the configuration file. Can this be accomplished in any =
way?
Thanks,
Andrei Goldchleger
--__--__--
_______________________________________________
Quickfix-developers mailing list
. Qui...@li...
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
End of Quickfix-developers Digest=20
--=20
Michael Lyszczek
1 North End Ave
Suite 1321
New York, NY, 10282
NEW EMAIL : ml...@fl... |