|
From: Bayu A. <kaz...@gm...> - 2019-11-01 06:35:58
|
My SessionStateListener does nothing in overridden method, but I got what to do in order to get Session.. but anyway, I use Session ses = Session.*lookupSession*(getSessionId()); >From this point, I can get current session that can determine whether my app is loggedOn or not. thank you very much for guiding me. Have A Nice Day. On Thu, Oct 31, 2019 at 5:15 PM Christoph John <chr...@ma...> wrote: > You could also implement the interface SessionStateListener. It has > callbacks onConnect() and onDisconnect(). One of these should get called > IMHO. > You could also call Session.isLoggedOn() anytime to check if it is logged > on or not. > > I don't know what you mean by "using timer". > > Cheers, > Chris. > > On 31.10.19 11:03, Bayu Adi wrote: > > Wow, thanks for very quick response. > > Yes, onLogout() did called when conection dropped out. > but it cannot handle connection at first time app start. > > it called from disconnect(eason, logError) at Session class > but how do I call it from banzai class? > > I can only get SessionID class from there? > is anythin I can do for this? > > for example, maybe I can get Session.state from logon() so I can get logon > status of this app? > > currently I've been using timer to know my app is logged in or not, but > this is very bad idea. > > > > On Thu, Oct 31, 2019 at 4:20 PM Christoph John <chr...@ma...> > wrote: > >> Hi, >> >> usually onLogout() is called when the connection is dropped. See >> explanations of callbacks here: >> https://github.com/quickfix-j/quickfixj#creating-a-quickfixj-application >> >> The logged exception comes from the network layer. The remote host could >> not be reached via any route. >> >> Cheers, >> Chris. >> >> On 31.10.19 05:44, Bayu Adi wrote: >> >> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ >> QuickFIX/J Support: http://www.quickfixj.org/support/ >> >> >> Hello, >> >> I've been wondering how to check app connection, and monitor every >> incoming event server. >> I've check the in the following : >> toAdmin, toApp, fromAdmin and fromApp >> incoming messages are handled fine, but if there were trouble in network >> connection somehow it not even catch.. >> >> and for the firsttime app is running, I want to check wether the >> connection is down or not, in console it was a exception displayed. >> but i was unable to trace where it was coming from.. >> >> there is log i get from console : >> <20191031-03:21:39, FIX.4.2:XXXX->CTS, error> >> (java.net.NoRouteToHostException during connection to >> /SERVER_IP:SERVER_PORT: java.net.NoRouteToHostException: No route to host: >> no further information (Next retry in 5000 milliseconds)) >> >> I want to know what method is produce this exception. >> >> thank in advance. >> -- >> >> Akira >> >> >> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. >> www.avast.com >> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >> >> >> _______________________________________________ >> Quickfixj-users mailing lis...@li...://lists.sourceforge.net/lists/listinfo/quickfixj-users >> >> >> -- >> Christoph John >> Software Engineering >> T +49 241 557...@ma... >> >> MACD GmbH >> Oppenhoffallee 103 >> 52066 Aachen, Germanywww.macd.com >> >> Amtsgericht Aachen: HRB 8151 >> Ust.-Id: DE 813021663 >> Geschäftsführer: George Macdonald >> >> > > -- > > Bayu Adi > > > -- > Christoph John > Software Engineering > T +49 241 557...@ma... > > MACD GmbH > Oppenhoffallee 103 > 52066 Aachen, Germanywww.macd.com > > Amtsgericht Aachen: HRB 8151 > Ust.-Id: DE 813021663 > Geschäftsführer: George Macdonald > > -- Bayu Adi |