Class MessageEntry

java.lang.Object
com.swiftmq.swiftlet.queue.MessageEntry

public class MessageEntry extends Object
MessageEntry wraps one message entry of a queue, consisting of a message index and the message.
Author:
IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
  • Constructor Details

    • MessageEntry

      public MessageEntry()
      Create a new MessageEntry.
    • MessageEntry

      public MessageEntry(MessageIndex messageIndex, MessageImpl message)
      Create a new MessageEntry.
      Parameters:
      messageIndex - message index.
      message - message.
  • Method Details

    • getMessageIndex

      public MessageIndex getMessageIndex()
      Returns the message index.
      Returns:
      message index.
    • setMessageIndex

      public void setMessageIndex(MessageIndex messageIndex)
      Sets the message index.
      Parameters:
      messageIndex - message index.
    • getMessage

      public MessageImpl getMessage()
      Returns the message.
      Returns:
      message.
    • setMessage

      public void setMessage(MessageImpl message)
      Sets the message.
      Parameters:
      message - message.
    • getConnectionId

      public int getConnectionId()
    • setConnectionId

      public void setConnectionId(int connectionId)
    • moveMessageAttributes

      public void moveMessageAttributes()
      Moves message attributes from the message index into the message. This sets JMS properties like delivery count and JMSRedelivered. It will be performed on the client side after receiving the message entry from the router.
    • writeContent

      public void writeContent(ToClientSerializer serializer) throws IOException
      Writes the content of this object to the stream via a to-client serializer (doesn't write routing headers)
      Parameters:
      serializer - serializer.
      Throws:
      IOException - on error.
    • writeContent

      public void writeContent(DataOutput out) throws IOException
      Writes the content of this object to the stream.
      Parameters:
      out - outstream.
      Throws:
      IOException - on error.
    • readContent

      public void readContent(DataInput in) throws IOException
      Reads the content from the stream.
      Parameters:
      in - instream.
      Throws:
      IOException - on error.
    • toString

      public String toString()
      Overrides:
      toString in class Object