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 ConsumerId
consumerId
static byte
DATA_STRUCTURE_TYPE
protected ActiveMQDestination
destination
protected long
timeout
-
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 void
configure(ConsumerInfo info)
Configures a message pull from the consumer informationConsumerId
getConsumerId()
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 consumerbyte
getDataStructureType()
ActiveMQDestination
getDestination()
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 consumerint
getQuantity()
long
getTimeout()
void
initTransients()
boolean
isAlwaysSignalDone()
boolean
isTracked()
void
setAlwaysSignalDone(boolean alwaysSignalDone)
void
setConsumerId(ConsumerId consumerId)
void
setCorrelationId(String correlationId)
void
setDestination(ActiveMQDestination destination)
void
setMessageId(MessageId messageId)
void
setQuantity(int quantity)
void
setTimeout(long timeout)
void
setTracked(boolean tracked)
Response
visit(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:
getDataStructureType
in 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:
initTransients
in interfaceTransientInitializer
-
-