org.activemq.message
Interface Packet

All Known Implementing Classes:
AbstractPacket, ActiveMQBytesMessage, ActiveMQMapMessage, ActiveMQMessage, ActiveMQObjectMessage, ActiveMQStreamMessage, ActiveMQTextMessage, BrokerAdminCommand, BrokerInfo, CachedValue, CapacityInfo, CapacityInfoRequest, CleanupConnectionInfo, ConnectionInfo, ConsumerInfo, DurableUnsubscribe, FlushPacket, IntResponseReceipt, KeepAlive, LocalBrokerInfo, MessageAck, ProducerInfo, Receipt, ResponseReceipt, SessionInfo, TempDestinationAdvisoryEvent, TransactionInfo, WireFormatInfo, XATransactionInfo

public interface Packet

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


Field Summary
static int ACTIVEMQ_BROKER_INFO
          Broker infomation message
static int ACTIVEMQ_BYTES_MESSAGE
          ActiveMQBytesMessage
static int ACTIVEMQ_CONNECTION_INFO
          Connection info message
static int ACTIVEMQ_MAP_MESSAGE
          ActiveMQMapMessage object
static int ACTIVEMQ_MESSAGE
          ActiveMQMessage object
static int ACTIVEMQ_MSG_ACK
          Message acknowledge
static int ACTIVEMQ_OBJECT_MESSAGE
          ActiveMQObjectMessage object
static int ACTIVEMQ_STREAM_MESSAGE
          ActiveMQStreamMessage object
static int ACTIVEMQ_TEXT_MESSAGE
          ActiveMQTextMessage object
static int BROKER_ADMIN_COMMAND
          A command to the Broker Admin
static int CACHED_VALUE_COMMAND
          transmit cached values for the wire format
static int CAPACITY_INFO
          Infomation about the Capacity for more Messages for either Connection/Broker
static int CAPACITY_INFO_REQUEST
          Request infomation about the current capacity
static int CLEANUP_CONNECTION_INFO
          transmit cached values for the wire format
static int CONSUMER_INFO
          Consumer Infomation
static int DURABLE_UNSUBSCRIBE
          Durable Unsubscribe message
static int INT_RESPONSE_RECEIPT_INFO
          A receipt with an Integer reponse.
static int KEEP_ALIVE
          Keep-alive message
static int NOT_SET
          Unspecified Packet type
static int PRODUCER_INFO
          Producer Info
static int RECEIPT_INFO
          Recipt message
static int RESPONSE_RECEIPT_INFO
          A receipt with an Object reponse.
static int SESSION_INFO
          Session Info message
static int TRANSACTION_INFO
          Transaction info
static int WIRE_FORMAT_INFO
          Infomation about the wire format expected
static int XA_TRANSACTION_INFO
          XA Transaction info
 
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
 String getBrokersVisitedAsString()
           
 short getId()
           
 int getMemoryUsage()
          Get a hint about how much memory this Packet is consuming
 int getMemoryUsageReferenceCount()
           
 int getPacketType()
          Return the type of Packet
 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
 boolean isJMSMessage()
          Retrieve if a JMS Message type or not
 boolean isReceipt()
           
 boolean isReceiptRequired()
           
 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
 

Field Detail

NOT_SET

static final int NOT_SET
Unspecified Packet type

See Also:
Constant Field Values

ACTIVEMQ_MESSAGE

static final int ACTIVEMQ_MESSAGE
ActiveMQMessage object

See Also:
Constant Field Values

ACTIVEMQ_TEXT_MESSAGE

static final int ACTIVEMQ_TEXT_MESSAGE
ActiveMQTextMessage object

See Also:
Constant Field Values

ACTIVEMQ_OBJECT_MESSAGE

static final int ACTIVEMQ_OBJECT_MESSAGE
ActiveMQObjectMessage object

See Also:
Constant Field Values

ACTIVEMQ_BYTES_MESSAGE

static final int ACTIVEMQ_BYTES_MESSAGE
ActiveMQBytesMessage

See Also:
Constant Field Values

ACTIVEMQ_STREAM_MESSAGE

static final int ACTIVEMQ_STREAM_MESSAGE
ActiveMQStreamMessage object

See Also:
Constant Field Values

ACTIVEMQ_MAP_MESSAGE

static final int ACTIVEMQ_MAP_MESSAGE
ActiveMQMapMessage object

See Also:
Constant Field Values

ACTIVEMQ_MSG_ACK

static final int ACTIVEMQ_MSG_ACK
Message acknowledge

See Also:
Constant Field Values

RECEIPT_INFO

static final int RECEIPT_INFO
Recipt message

See Also:
Constant Field Values

CONSUMER_INFO

static final int CONSUMER_INFO
Consumer Infomation

See Also:
Constant Field Values

PRODUCER_INFO

static final int PRODUCER_INFO
Producer Info

See Also:
Constant Field Values

TRANSACTION_INFO

static final int TRANSACTION_INFO
Transaction info

See Also:
Constant Field Values

XA_TRANSACTION_INFO

static final int XA_TRANSACTION_INFO
XA Transaction info

See Also:
Constant Field Values

ACTIVEMQ_BROKER_INFO

static final int ACTIVEMQ_BROKER_INFO
Broker infomation message

See Also:
Constant Field Values

ACTIVEMQ_CONNECTION_INFO

static final int ACTIVEMQ_CONNECTION_INFO
Connection info message

See Also:
Constant Field Values

SESSION_INFO

static final int SESSION_INFO
Session Info message

See Also:
Constant Field Values

DURABLE_UNSUBSCRIBE

static final int DURABLE_UNSUBSCRIBE
Durable Unsubscribe message

See Also:
Constant Field Values

RESPONSE_RECEIPT_INFO

static final int RESPONSE_RECEIPT_INFO
A receipt with an Object reponse.

See Also:
Constant Field Values

INT_RESPONSE_RECEIPT_INFO

static final int INT_RESPONSE_RECEIPT_INFO
A receipt with an Integer reponse.

See Also:
Constant Field Values

CAPACITY_INFO

static final int CAPACITY_INFO
Infomation about the Capacity for more Messages for either Connection/Broker

See Also:
Constant Field Values

CAPACITY_INFO_REQUEST

static final int CAPACITY_INFO_REQUEST
Request infomation about the current capacity

See Also:
Constant Field Values

WIRE_FORMAT_INFO

static final int WIRE_FORMAT_INFO
Infomation about the wire format expected

See Also:
Constant Field Values

KEEP_ALIVE

static final int KEEP_ALIVE
Keep-alive message

See Also:
Constant Field Values

BROKER_ADMIN_COMMAND

static final int BROKER_ADMIN_COMMAND
A command to the Broker Admin

See Also:
Constant Field Values

CACHED_VALUE_COMMAND

static final int CACHED_VALUE_COMMAND
transmit cached values for the wire format

See Also:
Constant Field Values

CLEANUP_CONNECTION_INFO

static final int CLEANUP_CONNECTION_INFO
transmit cached values for the wire format

See Also:
Constant Field Values
Method Detail

getPacketType

int getPacketType()
Return the type of Packet

Returns:
integer representation of the type of Packet

getId

short getId()
Returns:
the unique id for this Packet

setId

void setId(short newId)
Set the unique id for this Packet

Parameters:
newId -

isReceiptRequired

boolean isReceiptRequired()
Returns:
true if a Recipt is required

isReceipt

boolean isReceipt()
Returns:
true if this is a Receipt

setReceiptRequired

void setReceiptRequired(boolean value)
Set if a Recipt if required on receiving this Packet

Parameters:
value -

isJMSMessage

boolean isJMSMessage()
Retrieve if a JMS Message type or not

Returns:
true if it is a JMS Message

getMemoryUsage

int getMemoryUsage()
Get a hint about how much memory this Packet is consuming

Returns:
an aproximation of the current memory used by this instance

setMemoryUsage

void setMemoryUsage(int newMemoryUsage)
Set a hint about how mujch memory this packet is consuming

Parameters:
newMemoryUsage -

incrementMemoryReferenceCount

int incrementMemoryReferenceCount()
Increment reference count for bounded memory collections

Returns:
the incremented reference value
See Also:
MemoryBoundedQueue

decrementMemoryReferenceCount

int decrementMemoryReferenceCount()
Decrement reference count for bounded memory collections

Returns:
the decremented reference value
See Also:
MemoryBoundedQueue

getMemoryUsageReferenceCount

int getMemoryUsageReferenceCount()
Returns:
the current reference count for bounded memory collections
See Also:
MemoryBoundedQueue

addBrokerVisited

void addBrokerVisited(String brokerName)
As the packet passes through the broker add the broker to the visited list

Parameters:
brokerName - the name of the broker

clearBrokersVisited

void clearBrokersVisited()
clear list of brokers visited


hasVisited

boolean hasVisited(String brokerName)
test to see if the named broker has already seen this packet

Parameters:
brokerName - the name of the broker
Returns:
true if the packet has visited the broker

getBrokersVisitedAsString

String getBrokersVisitedAsString()
Returns:
Returns the brokersVisited.


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