org.jboss.messaging.interfaces
Interface MessageSet

All Known Implementing Classes:
MemoryMessageSet (src)

public interface MessageSet

A message set.


Method Summary
 void add(MessageReference (src)  reference)
          Add a message to the message set.
 void lock()
          Lock the message set
 MessageReference (src) remove(Consumer (src)  consumer)
          Remove a message from the message set.
 void setConsumer(Consumer (src)  consumer)
          Set the consumer for out of band notifications
 void unlock()
          Unlock the message set
 

Method Detail

add

public void add(MessageReference (src)  reference)
Add a message to the message set.

Parameters:
reference - the message reference to add

remove

public MessageReference (src)  remove(Consumer (src)  consumer)
Remove a message from the message set.

Parameters:
consumer - the consumer used to accept the message
Returns:
a message or null if there are no messages

lock

public void lock()
Lock the message set


unlock

public void unlock()
Unlock the message set


setConsumer

public void setConsumer(Consumer (src)  consumer)
Set the consumer for out of band notifications

Parameters:
consumer - the consumer