org.jboss.messaging.interfaces
Interface Consumer

All Known Subinterfaces:
ChannelHandler (src)
All Known Implementing Classes:
AbstractChannelHandler (src)

public interface Consumer

A consumer of messages.


Method Summary
 boolean accepts(MessageReference (src)  reference, boolean active)
          Check whether the consumer accepts the message.
 void onMessage(MessageReference (src)  reference)
          Invoked when a message needs consuming
 

Method Detail

accepts

public boolean accepts(MessageReference (src)  reference,
                       boolean active)
Check whether the consumer accepts the message.

Parameters:
reference - the message reference
active - whether to check for activity, pass false to test for acceptance, true when extra checks for an active consumer are required.
Returns:
true when it accepts the message, false otherwise

onMessage

public void onMessage(MessageReference (src)  reference)
Invoked when a message needs consuming

Parameters:
reference - the message reference