org.directwebremoting.jms
Class BlockingMessageListener

java.lang.Object
  extended by org.directwebremoting.jms.BlockingMessageListener
All Implemented Interfaces:
javax.jms.MessageListener

public class BlockingMessageListener
extends java.lang.Object
implements javax.jms.MessageListener

A MessageListener especially for DwrMessageConsumer that enables us to block waiting for a message.

What happens if we try to do a blocking read while there is a non-blocking MessageListener waiting? The JavaDoc says the read can be one or the other so we assume that we don't need to deliver to both syncs.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
BlockingMessageListener()
           
 
Method Summary
 void onMessage(javax.jms.Message newMessage)
           
 javax.jms.Message receive(long timeout)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockingMessageListener

public BlockingMessageListener()
Method Detail

onMessage

public void onMessage(javax.jms.Message newMessage)
Specified by:
onMessage in interface javax.jms.MessageListener

receive

public javax.jms.Message receive(long timeout)
See Also:
MessageConsumer.receive(long)

Copyright 2008