Re: [Quickfix-users] need for SwingUtilities in trading system application?
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-12-28 14:48:36
|
Well, the only reason that invokeLater is being called is due to the requirement that Swing components need to be updated in the dispatch thread. If you are not using Swing, this requirement goes away completely and there isn't really a need to make an asynchronous call at all. Just do whatever you want to do in the fromApp method. Just make sure to synchronize your objects where necessary. If you do not want to deal with threads at all then you should use the poll() method in place of start(). --oren On Dec 28, 2004, at 6:51 AM, Murray Smigel wrote: > Hi, > I notice that you are using the SwingUtilities function invokeLater to > invoke > the run function of doFromApp in your java example program > BanzaiApplication.java > > public void fromApp(quickfix.Message message, SessionID sessionID) > throws FieldNotFound, IncorrectDataFormat, IncorrectTagValue, > UnsupportedMessageType { > try { > SwingUtilities.invokeLater(new doFromApp(message, sessionID)); > } catch(Exception e) {} > } > > I am trying to build a version of the Application that works in a > non-graphic > environment and so would like to avoid the dependency on > SwingUtilities. Is > there an easy way to do the asynchronous invokation of the run method > without > using the SwingUtilities.invokeLater function? > > Thanks, > murray smigel > |