|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.message.AbstractPacket
Abstract class for a transportable Packet
| Field Summary | |
protected BitArray |
bitArray
|
(package private) static int |
BROKERS_VISITED_INDEX
|
(package private) static int |
RECEIPT_REQUIRED_INDEX
Message flag indexes (used for writing/reading to/from a Stream |
| Fields inherited from interface org.codehaus.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, CAPACITY_INFO, CAPACITY_INFO_REQUEST, CONSUMER_INFO, DURABLE_UNSUBSCRIBE, INT_RESPONSE_RECEIPT_INFO, PRODUCER_INFO, RECEIPT_INFO, RESPONSE_RECEIPT_INFO, SESSION_INFO, TRANSACTION_INFO, WIRE_FORMAT_INFO, XA_TRANSACTION_INFO |
| Constructor Summary | |
protected |
AbstractPacket()
|
| Method Summary | |
void |
addBrokerVisited(String brokerName)
As the packet passes through the broker add the broker to the visited list |
int |
decrementMemoryReferenceCount()
Decrement reference count for bounded memory collections |
boolean |
equals(Object obj)
Tests equality with another instance |
protected boolean |
equals(Object left,
Object right)
A helper method used when implementing equals() which returns true if the objects are identical or equal handling nulls properly |
BitArray |
getBitArray()
|
(package private) Object[] |
getBrokersVisited()
|
String |
getBrokersVisitedAsString()
|
String |
getId()
|
int |
getMemoryUsage()
Get a hint about how much memory this Packet is consuming |
int |
getMemoryUsageReferenceCount()
|
protected static String |
getPacketTypeAsString(int type)
|
int |
hashCode()
|
boolean |
hasVisited(String brokerName)
test to see if the named broker has already seen this packet |
int |
incrementMemoryReferenceCount()
Increment reference count for bounded memory collections |
(package private) void |
initializeBrokersVisited()
|
protected void |
initializeOther(AbstractPacket other)
Initializes another message with current values from this instance |
boolean |
isJMSMessage()
Retrieve if a JMS Message type or not |
boolean |
isReceipt()
|
boolean |
isReceiptRequired()
|
void |
setBitArray(BitArray bitArray)
|
void |
setId(String newId)
Set the unique id for this Packet |
void |
setMemoryUsage(int newMemoryUsage)
Set a hint about how mujch memory this packet is consuming |
void |
setReceiptRequired(boolean value)
Set if a Recipt if required on receiving this Packet |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.codehaus.activemq.message.Packet |
getPacketType |
| Field Detail |
static final int RECEIPT_REQUIRED_INDEX
static final int BROKERS_VISITED_INDEX
protected BitArray bitArray
| Constructor Detail |
protected AbstractPacket()
| Method Detail |
public String getId()
getId in interface Packetpublic void setId(String newId)
setId in interface PacketnewId - public boolean isReceiptRequired()
isReceiptRequired in interface Packetpublic boolean isReceipt()
isReceipt in interface Packetpublic void setReceiptRequired(boolean value)
setReceiptRequired in interface Packetvalue - public boolean isJMSMessage()
isJMSMessage in interface Packetpublic boolean equals(Object obj)
obj - - the other instance to test equality with
public int hashCode()
public int getMemoryUsage()
getMemoryUsage in interface Packetpublic void setMemoryUsage(int newMemoryUsage)
setMemoryUsage in interface PacketnewMemoryUsage - public int incrementMemoryReferenceCount()
incrementMemoryReferenceCount in interface PacketMemoryBoundedQueuepublic int decrementMemoryReferenceCount()
decrementMemoryReferenceCount in interface PacketMemoryBoundedQueuepublic int getMemoryUsageReferenceCount()
getMemoryUsageReferenceCount in interface PacketMemoryBoundedQueuepublic void addBrokerVisited(String brokerName)
addBrokerVisited in interface PacketbrokerName - the name of the brokerpublic boolean hasVisited(String brokerName)
hasVisited in interface PacketbrokerName - the name of the broker
public String getBrokersVisitedAsString()
getBrokersVisitedAsString in interface Packetpublic String toString()
protected static String getPacketTypeAsString(int type)
protected boolean equals(Object left,
Object right)
left - right -
protected void initializeOther(AbstractPacket other)
other - the other ActiveMQMessage to initializevoid initializeBrokersVisited()
Object[] getBrokersVisited()
public BitArray getBitArray()
public void setBitArray(BitArray bitArray)
bitArray - The bitArray to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||