OrderInterceptor.MessageOrder (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.tribes.group.interceptors, class: OrderInterceptor, class: MessageOrder

# Class OrderInterceptor.MessageOrder

java.lang.Object
org.apache.catalina.tribes.group.interceptors.OrderInterceptor.MessageOrder

Enclosing class:
  `OrderInterceptor`

protected static class OrderInterceptor.MessageOrder extends Object
Represents 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

  Modifier and Type
  Method
  Description
  `static OrderInterceptor.MessageOrder`
  `add(OrderInterceptor.MessageOrder head, OrderInterceptor.MessageOrder add)`
  Adds a message order to the end of the chain.
  `int`
  `getCount()`
  Returns the count of messages in this chain.
  `ChannelMessage`
  `getMessage()`
  Returns the channel message.
  `int`
  `getMsgNr()`
  Returns the message number.
  `OrderInterceptor.MessageOrder`
  `getNext()`
  Returns the next message in the order.
  `boolean`
  `isExpired(long expireTime)`
  Checks if this message has expired.
  `void`
  `setMessage(ChannelMessage msg)`
  Sets the channel message.
  `void`
  `setNext(OrderInterceptor.MessageOrder order)`
  Sets the next message in the order.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MessageOrder

    public MessageOrder(int msgNr, ChannelMessage msg)
    Constructs a MessageOrder with the given message number and message.
    Parameters:
      `msgNr` - The message number
      `msg` - The channel message

- ## Method Details

  - ### 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 chain
      `add` - The message order to add
    Returns:
      The head of the updated chain

  - ### getMsgNr

    public int getMsgNr()
    Returns the message number.
    Returns:
      The message number