[Quickfix-developers] starting/stopping a session?
Brought to you by:
orenmnero
From: Andrew M. <an...@nm...> - 2004-12-16 02:27:56
|
I have a java application which does the required System.loadLibrary("quickfix_jni"), then creates several ThreadedSocketInitiator and ThreadedSocketAcceptor objects. In the config files for these initiators and acceptors I specify multiple [SESSION] blocks with unique SenderCompID and targetCompID. I can do this... quickfix.Session s = Session.lookupSession(id); but it would be nice if I could do this... quickfix.Session s = Session.lookupSession(id); quickfix.SessionID sid = s.getSessionID(); and this... quickfix.Session[] sessions = Session.getSessions(); and this... acceptor = new ThreadedSocketAcceptor( application, messageStoreFactory, settings, logFactory, messageFactory); quickfix.Session[] sessions = acceptor.getSessions(); sessions[0].stop(); it would also be nice if the Session(static) and Session(specific to one FIX Session) objects returned an iterator over all the unique sessions they control. Currently, I can only get a reference to the individual FIX session objects which have been instantiated if I create a SessionID equal to that session's, then pass that SessionID into the lookupSession method. I have to parse the config files to get those strings. I have multiple acceptors and initiators and I have no way of knowing which sessions belong to which acceptor/initiator without refering to the config files. Is that right? -Andrew |