[QFJ] SessionSettings line ending detection (was: RE: [Quickfix-developers] SessionSettings improvem
Brought to you by:
orenmnero
|
From: John H. <jhe...@bo...> - 2005-12-19 19:37:12
|
This is kind of a delayed response to this thread, but a config file
created on Windows ("\r\n") and copied untranslated to Solaris ("\n")
will not be parsed properly if the tokenizer is just looking for the
line.separator system property; the "\r" will be stuck on the end of
values and cause ConfigErrors. The old approach didn't have this
problem; any of the line ending characters would end the value token.
=20
Would anyone object to reverting to the old way?
=20
________________________________
From: qui...@li...
[mailto:qui...@li...] On Behalf Of
Steve Bate
Sent: Tuesday, December 06, 2005 12:18 PM
To: 'QuickFIX Developers'
Subject: RE: [Quickfix-developers] SessionSettings improvement (I
hope!)...
Hi Tom,
=20
I don't know if I'd call it a scrubbing but the class has had a light
washing recently. You can see the
changes in the CVS HEAD or QFJ_BRANCH_1_0 branch (the basis of the next
release). The property
name and value parsing now allows a wider range of characters. The line
ending check has also been
made more platform independent although it's probably still not as good
as it could be.
=20
The SessionSettings is not an interface because we are maintaining API
compatibility with the C++=20
JNI wrapper. It's possible to programatically set individual nondefault
properties in a SessionSettings=20
object. There are many examples in the unit tests. There's currently no
way to set individual
default parameters. That can be added without breaking compatibility
with the QFJ JNI code.
=20
[Note: I just added the unit tests and implementation for default
property setters (the getters were already=20
there). They are in the QFJ 1.0 branch and the HEAD.]
=20
Steve Bate
Smart Trade Technologies
Phone: +33 4 42 90 03 97
http://www.smart-trade.net/
=20
________________________________
From: qui...@li...
[mailto:qui...@li...] On Behalf Of
Tom Dilatush
Sent: Tuesday, December 06, 2005 4:54 PM
To: Shepheard, Toby (London)
Cc: QuickFIX Developers
Subject: Re: [Quickfix-developers] SessionSettings improvement
(I hope!)...
=09
=09
Hi, Toby...
=09
No argument with any of that. But actually, I think the whole
class could use a good scrubbing. That odd construct "\r\n".indexOf(ch)
I borrowed from a piece of code just following the one I modified; it's
in there more than once. And that whole tokenizer is a bit hard to
follow. Also, I'd like to see the SessionSettings made into an
interface, so that other kinds of session settings could be created. In
my application, I've wrapped it with a class that lets me set the
settings individually and programatically (so I can fish the settings
from a master config file for the entire app), but the interface to
SessionSettings is kinda wierd -- I generate the InputStream to feed to
SessionSettings <smile>.
=09
|