|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemq.message.AbstractPacket
public abstract class AbstractPacket
Abstract class for a transportable Packet
| Field Summary | |
|---|---|
protected BitArray |
bitArray
|
static int |
BROKERS_VISITED_INDEX
|
protected int |
cachedHashCode
|
static int |
RECEIPT_REQUIRED_INDEX
Message flag indexes (used for writing/reading to/from a Stream |
| Constructor Summary | |
|---|---|
protected |
AbstractPacket()
|
| Method Summary | |
|---|---|
void |
addBrokerVisited(String brokerName)
As the packet passes through the broker add the broker to the visited list |
void |
clearBrokersVisited()
clear list of brokers visited |
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()
|
Object[] |
getBrokersVisited()
|
String |
getBrokersVisitedAsString()
|
short |
getId()
|
int |
getMemoryUsage()
Get a hint about how much memory this Packet is consuming |
int |
getMemoryUsageReferenceCount()
|
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 |
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 |
setBrokersVisitedAsString(String value)
|
void |
setId(short 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.activemq.message.Packet |
|---|
getPacketType |
| Field Detail |
|---|
public static final int RECEIPT_REQUIRED_INDEX
public static final int BROKERS_VISITED_INDEX
protected BitArray bitArray
protected transient int cachedHashCode
| Constructor Detail |
|---|
protected AbstractPacket()
| Method Detail |
|---|
public short getId()
getId in interface Packetpublic void setId(short 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)
equals in class Objectobj - - the other instance to test equality with
public int hashCode()
hashCode in class Objectpublic 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 void clearBrokersVisited()
clearBrokersVisited in interface Packetpublic boolean hasVisited(String brokerName)
hasVisited in interface PacketbrokerName - the name of the broker
public String getBrokersVisitedAsString()
getBrokersVisitedAsString in interface Packetpublic void setBrokersVisitedAsString(String value)
public String toString()
toString in class Objectpublic static String getPacketTypeAsString(int type)
protected boolean equals(Object left,
Object right)
left - right -
protected void initializeOther(AbstractPacket other)
other - the other ActiveMQMessage to initializepublic 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 | |||||||||