|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Subscription
A Subscription holds messages to be dispatched to a a Client Consumer
Method Summary | |
---|---|
void |
addMessage(MessageContainer container,
ActiveMQMessage message)
If the Subscription is a target for the message, the subscription will add a reference to the message and register an interest in the message to the container |
void |
clear()
Called when the Subscription is discarded |
String |
getClientId()
|
String |
getConsumerId()
|
int |
getConsumerNumber()
|
ActiveMQDestination |
getDestination()
|
MessageIdentity |
getLastMessageIdentity()
Retreives the messageIdentity of the last message sent to this Queue based Subscription |
ActiveMQMessage[] |
getMessagesToDispatch()
Retrieve messages to dispatch |
String |
getPersistentKey()
Returns the persistent key used to uniquely identify this durable topic subscription |
String |
getSelector()
|
String |
getSubscriberName()
|
SubscriberEntry |
getSubscriptionEntry()
Lazily creates the persistent entry representation of this subscription |
boolean |
isActive()
|
boolean |
isAtPrefetchLimit()
Indicates the Subscription it's reached it's pre-fetch limit |
boolean |
isBrowser()
Indicates the consumer is a browser only |
boolean |
isDurableTopic()
Indicates the Consumer is a Durable Subscriber |
boolean |
isLocalSubscription()
|
boolean |
isReadyToDispatch()
Indicates if this Subscription has more messages to send to the Consumer |
boolean |
isSameDurableSubscription(ConsumerInfo info)
Checks if this subscription is a duplicate durable subscription of the given consumer info |
boolean |
isTarget(ActiveMQMessage message)
determines if the Subscription is interested in the message |
boolean |
isWildcard()
|
void |
messageConsumed(MessageAck ack)
Indicates a message has been delivered to a MessageConsumer which is typically called for topic based subscriptions |
void |
reset()
Called when an active message consumer has closed. |
void |
setActive(boolean newActive)
set the state of the Subscription |
void |
setActiveConsumer(BrokerClient client,
ConsumerInfo info)
Set the active consumer info |
void |
setLastMessageIdentifier(MessageIdentity messageIdentity)
Used for a Queue based Subscription to set the last acknowledged message ID |
Method Detail |
---|
void setActiveConsumer(BrokerClient client, ConsumerInfo info)
client
- info
- void clear() throws JMSException
JMSException
void reset() throws JMSException
JMSException
String getClientId()
String getSubscriberName()
ActiveMQDestination getDestination()
String getSelector()
boolean isActive()
void setActive(boolean newActive) throws JMSException
newActive
-
JMSException
int getConsumerNumber()
String getConsumerId()
boolean isTarget(ActiveMQMessage message) throws JMSException
message
-
JMSException
void addMessage(MessageContainer container, ActiveMQMessage message) throws JMSException
container
- message
-
JMSException
void messageConsumed(MessageAck ack) throws JMSException
ack
-
JMSException
ActiveMQMessage[] getMessagesToDispatch() throws JMSException
JMSException
boolean isReadyToDispatch() throws JMSException
JMSException
boolean isAtPrefetchLimit() throws JMSException
JMSException
boolean isDurableTopic() throws JMSException
JMSException
boolean isBrowser() throws JMSException
JMSException
MessageIdentity getLastMessageIdentity() throws JMSException
JMSException
void setLastMessageIdentifier(MessageIdentity messageIdentity) throws JMSException
messageIdentity
-
JMSException
boolean isWildcard()
String getPersistentKey()
boolean isSameDurableSubscription(ConsumerInfo info) throws JMSException
info
-
JMSException
SubscriberEntry getSubscriptionEntry()
boolean isLocalSubscription()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |