Package com.swiftmq.swiftlet.queue
Class MessageEntry
- java.lang.Object
-
- com.swiftmq.swiftlet.queue.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 Summary
Constructors Constructor Description MessageEntry()
Create a new MessageEntry.MessageEntry(MessageIndex messageIndex, MessageImpl message)
Create a new MessageEntry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getConnectionId()
MessageImpl
getMessage()
Returns the message.MessageIndex
getMessageIndex()
Returns the message index.void
moveMessageAttributes()
Moves message attributes from the message index into the message.void
readContent(java.io.DataInput in)
Reads the content from the stream.void
setConnectionId(int connectionId)
void
setMessage(MessageImpl message)
Sets the message.void
setMessageIndex(MessageIndex messageIndex)
Sets the message index.java.lang.String
toString()
void
writeContent(ToClientSerializer serializer)
Writes the content of this object to the stream via a to-client serializer (doesn't write routing headers)void
writeContent(java.io.DataOutput out)
Writes the content of this object to the stream.
-
-
-
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 classjava.lang.Object
-
-