Name
MessageListener
Synopsis
A MessageListener
is registered by a client with a MessageConsumer
, to
allow it to asynchronously receive messages. When the consumer
receives a message, the listener’s onMessage()
method is invoked. The
consumer will wait until the onMessage()
method is complete before
delivering the next message.
public interface MessageListener { // Public Instance Methods public abstract void onMessage(javax.jms.Message message); }
Passed To
MessageConsumer.setMessageListener()
, javax.jms.Session.setMessageListener()
Returned By
MessageConsumer.getMessageListener()
, javax.jms.Session.getMessageListener()
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.