Package org.apache.activemq.command
Class MessagePull
- java.lang.Object
-
- org.apache.activemq.command.BaseCommand
-
- org.apache.activemq.command.MessagePull
-
- All Implemented Interfaces:
Command,DataStructure,TransientInitializer
public class MessagePull extends BaseCommand implements TransientInitializer
Used to pull messages on demand.
-
-
Field Summary
Fields Modifier and Type Field Description protected ConsumerIdconsumerIdstatic byteDATA_STRUCTURE_TYPEprotected ActiveMQDestinationdestinationprotected longtimeout-
Fields inherited from class org.apache.activemq.command.BaseCommand
commandId, responseRequired
-
-
Constructor Summary
Constructors Constructor Description MessagePull()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(ConsumerInfo info)Configures a message pull from the consumer informationConsumerIdgetConsumerId()StringgetCorrelationId()An optional correlation ID which could be used by a broker to decide which messages are pulled on demand from a queue for a consumerbytegetDataStructureType()ActiveMQDestinationgetDestination()MessageIdgetMessageId()An optional message ID which could be used by a broker to decide which messages are pulled on demand from a queue for a consumerintgetQuantity()longgetTimeout()voidinitTransients()booleanisAlwaysSignalDone()booleanisTracked()voidsetAlwaysSignalDone(boolean alwaysSignalDone)voidsetConsumerId(ConsumerId consumerId)voidsetCorrelationId(String correlationId)voidsetDestination(ActiveMQDestination destination)voidsetMessageId(MessageId messageId)voidsetQuantity(int quantity)voidsetTimeout(long timeout)voidsetTracked(boolean tracked)Responsevisit(CommandVisitor visitor)-
Methods inherited from class org.apache.activemq.command.BaseCommand
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isConsumerControl, isMarshallAware, isMessage, isMessageAck, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo, toString, toString
-
-
-
-
Field Detail
-
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE
- See Also:
- Constant Field Values
-
consumerId
protected ConsumerId consumerId
-
destination
protected ActiveMQDestination destination
-
timeout
protected long timeout
-
-
Method Detail
-
getDataStructureType
public byte getDataStructureType()
- Specified by:
getDataStructureTypein interfaceDataStructure- Returns:
- The type of the data structure
-
visit
public Response visit(CommandVisitor visitor) throws Exception
-
configure
public void configure(ConsumerInfo info)
Configures a message pull from the consumer information
-
getConsumerId
public ConsumerId getConsumerId()
-
setConsumerId
public void setConsumerId(ConsumerId consumerId)
-
getDestination
public ActiveMQDestination getDestination()
-
setDestination
public void setDestination(ActiveMQDestination destination)
-
getTimeout
public long getTimeout()
-
setTimeout
public void setTimeout(long timeout)
-
getCorrelationId
public String getCorrelationId()
An optional correlation ID which could be used by a broker to decide which messages are pulled on demand from a queue for a consumer
-
setCorrelationId
public void setCorrelationId(String correlationId)
-
getMessageId
public MessageId getMessageId()
An optional message ID which could be used by a broker to decide which messages are pulled on demand from a queue for a consumer
-
setMessageId
public void setMessageId(MessageId messageId)
-
setTracked
public void setTracked(boolean tracked)
-
isTracked
public boolean isTracked()
-
getQuantity
public int getQuantity()
-
setQuantity
public void setQuantity(int quantity)
-
isAlwaysSignalDone
public boolean isAlwaysSignalDone()
-
setAlwaysSignalDone
public void setAlwaysSignalDone(boolean alwaysSignalDone)
-
initTransients
public void initTransients()
- Specified by:
initTransientsin interfaceTransientInitializer
-
-