|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.message.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 Packet
public void setId(short newId)
setId
in interface Packet
newId
- public boolean isReceiptRequired()
isReceiptRequired
in interface Packet
public boolean isReceipt()
isReceipt
in interface Packet
public void setReceiptRequired(boolean value)
setReceiptRequired
in interface Packet
value
- public boolean isJMSMessage()
isJMSMessage
in interface Packet
public boolean equals(Object obj)
obj
- - the other instance to test equality with
public int hashCode()
public int getMemoryUsage()
getMemoryUsage
in interface Packet
public void setMemoryUsage(int newMemoryUsage)
setMemoryUsage
in interface Packet
newMemoryUsage
- public int incrementMemoryReferenceCount()
incrementMemoryReferenceCount
in interface Packet
MemoryBoundedQueue
public int decrementMemoryReferenceCount()
decrementMemoryReferenceCount
in interface Packet
MemoryBoundedQueue
public int getMemoryUsageReferenceCount()
getMemoryUsageReferenceCount
in interface Packet
MemoryBoundedQueue
public void addBrokerVisited(String brokerName)
addBrokerVisited
in interface Packet
brokerName
- the name of the brokerpublic void clearBrokersVisited()
clearBrokersVisited
in interface Packet
public boolean hasVisited(String brokerName)
hasVisited
in interface Packet
brokerName
- the name of the broker
public String getBrokersVisitedAsString()
getBrokersVisitedAsString
in interface Packet
public void setBrokersVisitedAsString(String value)
public String toString()
public 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 |