If a {@link #setThreadPool(ThreadPool)} is set, then messages are handled intheir own threads. This is desirable if the handling of a message can take considerable time and it is desired not to hold up the delivering thread (typically a HTTP request handling thread).
If the BayeuxService is constructed asynchronously (the default), then messages are delivered unsynchronized and multiple simultaneous calls to handling methods may occur.
If the BayeuxService is constructed as a synchronous service, then message delivery is synchronized on the internal {@link Client} instances used andonly a single call will be made to the handler method (unless a thread pool is used). @see MessageListener @author gregw
|
|