i have created an application which counts all http request with the way you suggested.... have single thread just readiing from the socket and put it on queue and then use executors and let your thread-pool control the processing of the queue...
so i think you do not need handlers... - paresh On Thu, Mar 12, 2009 at 10:45 AM, Oscar <[email protected]> wrote: > hi all- > To simplify the business-side code, I wanna run the messageReceived in the > main thread. > > I know I could put all the received object to the unique queue, and then > the main thread fetch and handle the message in the queue. > > Any better way? > > thanks, > -Oscar >
