Class StompSubscription
- java.lang.Object
-
- org.apache.activemq.transport.stomp.StompSubscription
-
- Direct Known Subclasses:
StompQueueBrowserSubscription
public class StompSubscription extends Object
Keeps track of the STOMP subscription so that acking is correctly done.- Author:
- chirino
-
-
Field Summary
Fields Modifier and Type Field Description protected String
ackMode
static String
AUTO_ACK
static String
CLIENT_ACK
protected ConsumerInfo
consumerInfo
protected ActiveMQDestination
destination
protected Map<MessageId,StompAckEntry>
dispatchedMessage
static String
INDIVIDUAL_ACK
protected Map<String,StompAckEntry>
pendingAcks
protected ProtocolConverter
protocolConverter
protected String
subscriptionId
protected LinkedList<StompAckEntry>
transactedMessages
protected String
transformation
-
Constructor Summary
Constructors Constructor Description StompSubscription(ProtocolConverter stompTransport, String subscriptionId, ConsumerInfo consumerInfo, String transformation, Map<String,StompAckEntry> pendingAcks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAckMode()
ConsumerInfo
getConsumerInfo()
ActiveMQDestination
getDestination()
String
getSubscriptionId()
boolean
isAutoAck()
boolean
isClientAck()
boolean
isIndividualAck()
MessageAck
onStompMessageNack(String messageId, TransactionId transactionId)
void
setAckMode(String ackMode)
void
setDestination(ActiveMQDestination destination)
-
-
-
Field Detail
-
AUTO_ACK
public static final String AUTO_ACK
- See Also:
- Constant Field Values
-
CLIENT_ACK
public static final String CLIENT_ACK
- See Also:
- Constant Field Values
-
INDIVIDUAL_ACK
public static final String INDIVIDUAL_ACK
- See Also:
- Constant Field Values
-
protocolConverter
protected final ProtocolConverter protocolConverter
-
subscriptionId
protected final String subscriptionId
-
consumerInfo
protected final ConsumerInfo consumerInfo
-
dispatchedMessage
protected final Map<MessageId,StompAckEntry> dispatchedMessage
-
pendingAcks
protected final Map<String,StompAckEntry> pendingAcks
-
transactedMessages
protected final LinkedList<StompAckEntry> transactedMessages
-
ackMode
protected String ackMode
-
destination
protected ActiveMQDestination destination
-
transformation
protected String transformation
-
-
Constructor Detail
-
StompSubscription
public StompSubscription(ProtocolConverter stompTransport, String subscriptionId, ConsumerInfo consumerInfo, String transformation, Map<String,StompAckEntry> pendingAcks)
-
-
Method Detail
-
onStompMessageNack
public MessageAck onStompMessageNack(String messageId, TransactionId transactionId) throws ProtocolException
- Throws:
ProtocolException
-
getAckMode
public String getAckMode()
-
setAckMode
public void setAckMode(String ackMode)
-
isAutoAck
public boolean isAutoAck()
-
isClientAck
public boolean isClientAck()
-
isIndividualAck
public boolean isIndividualAck()
-
getSubscriptionId
public String getSubscriptionId()
-
setDestination
public void setDestination(ActiveMQDestination destination)
-
getDestination
public ActiveMQDestination getDestination()
-
getConsumerInfo
public ConsumerInfo getConsumerInfo()
-
-