Package com.swiftmq.swiftlet.queue
Class MessageEntry
java.lang.Object
com.swiftmq.swiftlet.queue.MessageEntry
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
ConstructorsConstructorDescriptionCreate a new MessageEntry.MessageEntry
(MessageIndex messageIndex, MessageImpl message) Create a new MessageEntry. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the message.Returns the message index.void
Moves message attributes from the message index into the message.void
readContent
(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.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
(DataOutput out) Writes the content of this object to the stream.
-
Constructor Details
-
MessageEntry
public MessageEntry()Create a new MessageEntry. -
MessageEntry
Create a new MessageEntry.- Parameters:
messageIndex
- message index.message
- message.
-
-
Method Details
-
getMessageIndex
Returns the message index.- Returns:
- message index.
-
setMessageIndex
Sets the message index.- Parameters:
messageIndex
- message index.
-
getMessage
Returns the message.- Returns:
- message.
-
setMessage
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
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
Writes the content of this object to the stream.- Parameters:
out
- outstream.- Throws:
IOException
- on error.
-
readContent
Reads the content from the stream.- Parameters:
in
- instream.- Throws:
IOException
- on error.
-
toString
-