org.activemq.message
Class MessageAck

java.lang.Object
  extended byorg.activemq.message.AbstractPacket
      extended byorg.activemq.message.MessageAck
All Implemented Interfaces:
BodyPacket, Packet

public class MessageAck
extends AbstractPacket
implements BodyPacket

Denotes an object that can be serialized/deserailized using a PacketReader/PacketWriter


Field Summary
static int CACHED_VALUES_INDEX
           
static int EXPIRED_INDEX
           
static int EXTERNAL_MESSAGE_ID_INDEX
           
static int LONG_SEQUENCE_INDEX
           
static int MESSAGE_READ_INDEX
           
static int PERSISTENT_INDEX
           
static int TRANSACTION_ID_INDEX
           
static int XA_TRANS_INDEX
           
 
Fields inherited from class org.activemq.message.AbstractPacket
bitArray, BROKERS_VISITED_INDEX, cachedHashCode, RECEIPT_REQUIRED_INDEX
 
Fields inherited from interface org.activemq.message.Packet
ACTIVEMQ_BROKER_INFO, ACTIVEMQ_BYTES_MESSAGE, ACTIVEMQ_CONNECTION_INFO, ACTIVEMQ_MAP_MESSAGE, ACTIVEMQ_MESSAGE, ACTIVEMQ_MSG_ACK, ACTIVEMQ_OBJECT_MESSAGE, ACTIVEMQ_STREAM_MESSAGE, ACTIVEMQ_TEXT_MESSAGE, BROKER_ADMIN_COMMAND, CACHED_VALUE_COMMAND, CAPACITY_INFO, CAPACITY_INFO_REQUEST, CLEANUP_CONNECTION_INFO, CONSUMER_INFO, DURABLE_UNSUBSCRIBE, INT_RESPONSE_RECEIPT_INFO, KEEP_ALIVE, NOT_SET, PRODUCER_INFO, RECEIPT_INFO, RESPONSE_RECEIPT_INFO, SESSION_INFO, TRANSACTION_INFO, WIRE_FORMAT_INFO, XA_TRANSACTION_INFO
 
Constructor Summary
MessageAck()
           
 
Method Summary
 String getConsumerId()
           
 ActiveMQDestination getDestination()
           
 String getMessageID()
           
 MessageIdentity getMessageIdentity()
           
 int getPacketType()
          Return the type of Packet
 String getProducerKey()
           
 long getSequenceNumber()
           
 short getSessionId()
           
 Object getTransactionId()
           
 String getTransactionIDString()
          A helper method for the OpenWire protocol
 boolean isExpired()
           
 boolean isExternalMessageId()
           
 boolean isMessageRead()
           
 boolean isPartOfTransaction()
           
 boolean isPersistent()
           
 boolean isTemporary()
           
 boolean isXaTransacted()
           
 void readBody(DataInput dataIn)
           
 void setConsumerId(String consumerId)
           
 void setDestination(ActiveMQDestination destination)
           
 void setExpired(boolean expired)
           
 void setExternalMessageId(boolean externalMessageId)
           
 void setMessageID(String messageID)
           
 void setMessageRead(boolean messageRead)
           
 void setPersistent(boolean persistent)
           
 void setProducerKey(String producerKey)
           
 void setSequenceNumber(long messageSequence)
           
 void setSessionId(short sessionId)
           
 void setTransactionId(Object newTransactionId)
           
 void setTransactionIDString(String text)
          A helper method for the OpenWire protocol
 String toString()
           
 void writeBody(DataOutput dataOut)
           
 
Methods inherited from class org.activemq.message.AbstractPacket
addBrokerVisited, clearBrokersVisited, decrementMemoryReferenceCount, equals, equals, getBitArray, getBrokersVisited, getBrokersVisitedAsString, getId, getMemoryUsage, getMemoryUsageReferenceCount, getPacketTypeAsString, hashCode, hasVisited, incrementMemoryReferenceCount, initializeOther, isJMSMessage, isReceipt, isReceiptRequired, setBitArray, setBrokersVisitedAsString, setId, setMemoryUsage, setReceiptRequired
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MESSAGE_READ_INDEX

public static final int MESSAGE_READ_INDEX
See Also:
Constant Field Values

XA_TRANS_INDEX

public static final int XA_TRANS_INDEX
See Also:
Constant Field Values

PERSISTENT_INDEX

public static final int PERSISTENT_INDEX
See Also:
Constant Field Values

EXPIRED_INDEX

public static final int EXPIRED_INDEX
See Also:
Constant Field Values

TRANSACTION_ID_INDEX

public static final int TRANSACTION_ID_INDEX
See Also:
Constant Field Values

EXTERNAL_MESSAGE_ID_INDEX

public static final int EXTERNAL_MESSAGE_ID_INDEX
See Also:
Constant Field Values

CACHED_VALUES_INDEX

public static final int CACHED_VALUES_INDEX
See Also:
Constant Field Values

LONG_SEQUENCE_INDEX

public static final int LONG_SEQUENCE_INDEX
See Also:
Constant Field Values
Constructor Detail

MessageAck

public MessageAck()
Method Detail

getPacketType

public int getPacketType()
Return the type of Packet

Specified by:
getPacketType in interface Packet
Returns:
integer representation of the type of Packet

toString

public String toString()
Overrides:
toString in class AbstractPacket
Returns:
pretty print of this Packet

getTransactionId

public Object getTransactionId()
Returns:
Returns the transactionId.

setTransactionId

public void setTransactionId(Object newTransactionId)
Parameters:
newTransactionId - The transactionId to set.

readBody

public void readBody(DataInput dataIn)
              throws IOException
Specified by:
readBody in interface BodyPacket
Throws:
IOException

writeBody

public void writeBody(DataOutput dataOut)
               throws IOException
Specified by:
writeBody in interface BodyPacket
Throws:
IOException

isPartOfTransaction

public boolean isPartOfTransaction()
Returns:
Returns true if this message is part of a transaction

getMessageID

public String getMessageID()
Returns:
the messageId

setMessageID

public void setMessageID(String messageID)
Parameters:
messageID - The messageID to set.

isMessageRead

public boolean isMessageRead()
Returns:
Returns the messageRead.

setMessageRead

public void setMessageRead(boolean messageRead)
Parameters:
messageRead - The messageRead to set.

getConsumerId

public String getConsumerId()
Returns:
Returns the consumerId.

setConsumerId

public void setConsumerId(String consumerId)
Parameters:
consumerId - The consumerId to set.

isXaTransacted

public boolean isXaTransacted()
Returns:
Returns the xaTransacted.

getMessageIdentity

public MessageIdentity getMessageIdentity()

getDestination

public ActiveMQDestination getDestination()
Returns:
Returns the destination.

setDestination

public void setDestination(ActiveMQDestination destination)
Parameters:
destination - The destination to set.

isPersistent

public boolean isPersistent()
Returns:
Returns the persistent.

setPersistent

public void setPersistent(boolean persistent)
Parameters:
persistent - The persistent to set.

isTemporary

public boolean isTemporary()
Returns:
true the delivered message was to a non-persistent destination

isExpired

public boolean isExpired()
Returns:
Returns the expired.

setExpired

public void setExpired(boolean expired)
Parameters:
expired - The expired to set.

getProducerKey

public String getProducerKey()
Returns:
Returns the producerKey.

setProducerKey

public void setProducerKey(String producerKey)
Parameters:
producerKey - The producerKey to set.

getSequenceNumber

public long getSequenceNumber()
Returns:
Returns the messageSequence.

setSequenceNumber

public void setSequenceNumber(long messageSequence)
Parameters:
messageSequence - The messageSequence to set.

getSessionId

public short getSessionId()
Returns:
Returns the sessionId.

setSessionId

public void setSessionId(short sessionId)
Parameters:
sessionId - The sessionId to set.

isExternalMessageId

public boolean isExternalMessageId()
Returns:
Returns the externalMessageId.

setExternalMessageId

public void setExternalMessageId(boolean externalMessageId)
Parameters:
externalMessageId - The externalMessageId to set.

getTransactionIDString

public String getTransactionIDString()
                              throws IOException
A helper method for the OpenWire protocol

Throws:
IOException

setTransactionIDString

public void setTransactionIDString(String text)
                            throws IOException
A helper method for the OpenWire protocol

Throws:
IOException


Copyright © 2004-2007 Protique, Ltd.. All Rights Reserved.