From: Steve B. <sb...@sm...> - 2006-01-20 15:25:34
|
Hi Lars, =20 Yes, I didn't realize that was an extra method in QFJ. By concrete class, I mean the method is not defined in the Initiator interface, but only in the Initiator implementations. =20 QFJ is intended to be backwards compatible with the QuickFIX JNI wrapper. The two APIs are not identical since QFJ is a superset of QuickFIX JNI. You can more forward by changing a JAR file, but you may or may not be able to move backwards that way (depending on the QFJ features you use).=20 =20 This is why I'm concerned about QFJ returning sessions from getSessions() while JNI is returning=20 session IDs. That breaks the backwards compatibility. =20 To do what you want using the JNI wrapper, you can get the session IDs from the initiator and then get the sessions using Session.lookupSession(SessionID). You can then check the sessions individually for connections status. =20 Steve Bate Smart Trade Technologies Phone: +33 4 42 90 03 97 http://www.smart-trade.net/ ________________________________ From: qui...@li... [mailto:qui...@li...] On Behalf Of lar...@su... Sent: Friday, January 20, 2006 4:12 PM To: qui...@li... Subject: RE: [Quickfix-users] Checking that all sessions is connected =09 =09 Hmm, is that only in the Quickfix\j Version or how do I find that function since eclipse can't seem to find that function. =20 When I looked at the source files this is the code of the initiator in the dll version of the java: =20 void start() throws ConfigError, RuntimeError; void block() throws ConfigError, RuntimeError; boolean poll() throws ConfigError, RuntimeError; void stop(); void stop( boolean force ); boolean isLoggedOn(); ArrayList getSessions(); =20 =20 Looking at the API for quickfix\j I see that it has both functions=20 boolean isLoggedOn <file:///D:\stuff\sharestuff\quickfix-1.0.0-beta2-bin\quickfixj\doc\api\ quickfix\Initiator.html#isLoggedOn%28%29> ()=20 Checks the logged on status of the initiator's sessions.=20 boolean isLoggedOn <file:///D:\stuff\sharestuff\quickfix-1.0.0-beta2-bin\quickfixj\doc\api\ quickfix\Initiator.html#isLoggedOn%28quickfix.SessionID%29> (SessionID <file:///D:\stuff\sharestuff\quickfix-1.0.0-beta2-bin\quickfixj\doc\api\ quickfix\SessionID.html> session)=20 Checks the logged on status of the specified session. =20 =20 So how do I use this if I'm not using the quickfix\J but still have to use java? What do you mean by concrete class btw? =20 =20 I think I read somewhere that there shouldn't be any difference between the interface API you used for quickfix dll java version and quickfix\J, other then you didn't have to load the DLL.=20 =20 Lars =20 =09 ________________________________ From: qui...@li... [mailto:qui...@li...] On Behalf Of Steve Bate Sent: den 20 januari 2006 12:35 To: qui...@li... Subject: RE: [Quickfix-users] Checking that all sessions is connected =20 Hello Lars, =20 From looking at the JNI code it does appear that the initiators in the JNI wrapper return an array of SessionIDs. QFJ returns the actual sessions. This is an unintentional difference in the API. =20 Oren, do you have a preference about whether to return SessionIDs or Sessions from the JNI API? If we want to leave it the way it is in the JNI layer, I'll need to modify the initiators (and acceptors?) in QFJ to return the same data types.=20 =20 The initiator concrete classes also have an isLoggedOn(SessionID) method that is not present in the Initiator interface. That might be useful for your purposes. =20 Steve Bate Smart Trade Technologies Phone: +33 4 42 90 03 97 http://www.smart-trade.net/ =20 =09 ________________________________ From: qui...@li... [mailto:qui...@li...] On Behalf Of lar...@su... Sent: Friday, January 20, 2006 11:40 AM To: qui...@li... Subject: [Quickfix-users] Checking that all sessions is connected I'm using java and both quickfix\J and the regular native interface. I'm using multiple sessions and are looking on a way to get info on a specific session in the java environment.=20 =20 In the c/c++ environment the initiator/acceptor classes have both the function getSessions() and getSession(arguments). But the Java versions only have the getSessions() that returns the SessionID not the actually session. =20 =20 Then my problem is that if I want to know if every session is connected I for example want to use initiator.isConnected() to check that every connection is connected or check every connection separately.=20 The problem is that the isConnected() return true if any of the connections is connected and that I havn't found a way to check that a single connection is connected. =20 Do I have to keep track of logon/logoff myself in java but not in C/C++ =20 Lars |