org.activemq.message
Class ConsumerInfo
java.lang.Object
org.activemq.message.AbstractPacket
org.activemq.message.ConsumerInfo
- All Implemented Interfaces:
- Serializable, Packet
public class ConsumerInfo
- extends AbstractPacket
- implements Serializable
Describes a Message consumer
- Version:
- $Revision: 1.1.1.1 $
- See Also:
- Serialized Form
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 |
Methods inherited from class org.activemq.message.AbstractPacket |
addBrokerVisited, clearBrokersVisited, decrementMemoryReferenceCount, equals, getBitArray, getBrokersVisited, getBrokersVisitedAsString, getId, getMemoryUsage, getMemoryUsageReferenceCount, getPacketTypeAsString, hasVisited, incrementMemoryReferenceCount, initializeOther, isJMSMessage, isReceipt, isReceiptRequired, setBitArray, setBrokersVisitedAsString, setId, setMemoryUsage, setReceiptRequired |
ConsumerInfo
public ConsumerInfo()
getSessionId
public short getSessionId()
- Returns:
- Returns the sessionId.
setSessionId
public void setSessionId(short sessionId)
- Parameters:
sessionId
- The sessionId to set.
getPacketType
public int getPacketType()
- Return the type of Packet
- Specified by:
getPacketType
in interface Packet
- Returns:
- integer representation of the type of Packet
equals
public boolean equals(Object obj)
- Test for equality
- Overrides:
equals
in class AbstractPacket
- Parameters:
obj
- object to test
- Returns:
- true if equivalent
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractPacket
- Returns:
- hash code for instance
getClientId
public String getClientId()
- Returns:
- Returns the clientId.
setClientId
public void setClientId(String newClientId)
- Parameters:
newClientId
- The clientId to set.
getDestination
public ActiveMQDestination getDestination()
- Returns:
- Returns the destination.
setDestination
public void setDestination(ActiveMQDestination newDestination)
- Parameters:
newDestination
- The destination to set.
getSelector
public String getSelector()
- Returns:
- Returns the selector.
setSelector
public void setSelector(String newSelector)
- Parameters:
newSelector
- The selector to set.
isStarted
public boolean isStarted()
- Returns:
- Returns the started.
setStarted
public void setStarted(boolean flag)
- Parameters:
flag
- to indicate if started
getStartTime
public long getStartTime()
- Returns:
- Returns the startTime.
setStartTime
public void setStartTime(long newStartTime)
- Parameters:
newStartTime
- The startTime to set.
getConsumerNo
public int getConsumerNo()
- Returns:
- Returns the consumerNo.
setConsumerNo
public void setConsumerNo(int newConsumerNo)
- Parameters:
newConsumerNo
- The consumerNo to set.
getConsumerName
public String getConsumerName()
- Returns:
- Returns the consumer name.
setConsumerName
public void setConsumerName(String newconsumerName)
- Parameters:
newconsumerName
- The consumerName to set.
isDurableTopic
public boolean isDurableTopic()
- Returns:
- Returns true if the Consumer is a durable Topic subscriber
isNoLocal
public boolean isNoLocal()
- Returns:
- Returns the noLocal.
setNoLocal
public void setNoLocal(boolean noLocal)
- Parameters:
noLocal
- The noLocal to set.
isBrowser
public boolean isBrowser()
- Returns:
- Returns the browser.
setBrowser
public void setBrowser(boolean browser)
- Parameters:
browser
- The browser to set.
getPrefetchNumber
public int getPrefetchNumber()
- Returns:
- Returns the prefetchNumber.
setPrefetchNumber
public void setPrefetchNumber(int prefetchNumber)
- Parameters:
prefetchNumber
- The prefetchNumber to set.
getConsumerKey
public String getConsumerKey()
- Creates a primary key for the consumer info which uniquely
describes the consumer using a combination of clientID and
consumerName
- Returns:
- the consumerKey
getConsumerId
public String getConsumerId()
- Returns:
- Returns the consumerIdentifier.
setConsumerId
public void setConsumerId(String consumerIdentifier)
- Parameters:
consumerIdentifier
- The consumerIdentifier to set.
generateConsumerKey
public static String generateConsumerKey(String clientId,
String consumerName)
- Generate a primary key for a consumer from the clientId and consumerName
- Parameters:
clientId
- consumerName
-
- Returns:
isAdvisory
public boolean isAdvisory()
- Returns:
- true if the consumer is interested in advisory messages
toString
public String toString()
- Overrides:
toString
in class AbstractPacket
- Returns:
- a pretty print
Copyright © 2004-2009 Protique, Ltd.. All Rights Reserved.