Class OrderInterceptor.MessageOrder
- java.lang.Object
-
- org.apache.catalina.tribes.group.interceptors.OrderInterceptor.MessageOrder
-
- Enclosing class:
- OrderInterceptor
protected static class OrderInterceptor.MessageOrder extends java.lang.ObjectRepresents a message in the ordering queue.
-
-
Constructor Summary
Constructors Constructor Description MessageOrder(int msgNr, ChannelMessage msg)Constructs a MessageOrder with the given message number and message.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OrderInterceptor.MessageOrderadd(OrderInterceptor.MessageOrder head, OrderInterceptor.MessageOrder add)Adds a message order to the end of the chain.intgetCount()Returns the count of messages in this chain.ChannelMessagegetMessage()Returns the channel message.intgetMsgNr()Returns the message number.OrderInterceptor.MessageOrdergetNext()Returns the next message in the order.booleanisExpired(long expireTime)Checks if this message has expired.voidsetMessage(ChannelMessage msg)Sets the channel message.voidsetNext(OrderInterceptor.MessageOrder order)Sets the next message in the order.
-
-
-
Constructor Detail
-
MessageOrder
public MessageOrder(int msgNr, ChannelMessage msg)Constructs a MessageOrder with the given message number and message.- Parameters:
msgNr- The message numbermsg- The channel message
-
-
Method Detail
-
isExpired
public boolean isExpired(long expireTime)
Checks if this message has expired.- Parameters:
expireTime- The expiration time in milliseconds- Returns:
- true if the message has expired
-
getMessage
public ChannelMessage getMessage()
Returns the channel message.- Returns:
- The channel message
-
setMessage
public void setMessage(ChannelMessage msg)
Sets the channel message.- Parameters:
msg- The channel message
-
setNext
public void setNext(OrderInterceptor.MessageOrder order)
Sets the next message in the order.- Parameters:
order- The next message order
-
getNext
public OrderInterceptor.MessageOrder getNext()
Returns the next message in the order.- Returns:
- The next message order
-
getCount
public int getCount()
Returns the count of messages in this chain.- Returns:
- The message count
-
add
public static OrderInterceptor.MessageOrder add(OrderInterceptor.MessageOrder head, OrderInterceptor.MessageOrder add)
Adds a message order to the end of the chain.- Parameters:
head- The head of the chainadd- The message order to add- Returns:
- The head of the updated chain
-
getMsgNr
public int getMsgNr()
Returns the message number.- Returns:
- The message number
-
-