org.jboss.messaging.core.impl
Class OrderingGroup

java.lang.Object
  extended by org.jboss.messaging.core.impl.OrderingGroup

public class OrderingGroup
extends java.lang.Object

This class holds the states of messages in an ordering group.

Author:
Howard Gao

Constructor Summary
OrderingGroup(java.lang.String name)
           
 
Method Summary
 java.lang.String getGroupName()
           
 boolean hasPendingMessage()
          check if there are more message available in the list.
 int isAvailable(MessageReference ref)
          See if the ref be there and be the first Simply comparing the addresses simply doesn't work!
 void markSending(MessageReference ref)
          Set the flag that the Message is being delivered.
 boolean register(MessageReference ref)
          Adding a message to a list.
 void unregister(MessageReference ref)
          remove the message reference from the group Note: the ref will be removed if and only if the ref resides the first in the list, otherwise just ignore it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderingGroup

public OrderingGroup(java.lang.String name)
Method Detail

register

public boolean register(MessageReference ref)
Adding a message to a list. As messages are coming in order, we can just put the message to the end of the list.

Parameters:
ref - The message reference to be added
Throws:
JMSException

isAvailable

public int isAvailable(MessageReference ref)
See if the ref be there and be the first Simply comparing the addresses simply doesn't work!


unregister

public void unregister(MessageReference ref)
remove the message reference from the group Note: the ref will be removed if and only if the ref resides the first in the list, otherwise just ignore it.


hasPendingMessage

public boolean hasPendingMessage()
check if there are more message available in the list.


markSending

public void markSending(MessageReference ref)
Set the flag that the Message is being delivered.

Parameters:
ref -

getGroupName

public java.lang.String getGroupName()


Copyright © 2006 JBoss Inc. All Rights Reserved.