Class MessageEntry


  • public class MessageEntry
    extends java.lang.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 Detail

      • 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 Detail

      • 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 java.io.IOException
        Writes the content of this object to the stream via a to-client serializer (doesn't write routing headers)
        Parameters:
        serializer - serializer.
        Throws:
        java.io.IOException - on error.
      • writeContent

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object