public class DestinationFilter extends Object implements Destination
Modifier and Type | Field and Description |
---|---|
protected Destination |
next |
DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL, DEFAULT_DEAD_LETTER_STRATEGY
Constructor and Description |
---|
DestinationFilter(Destination next) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(ConnectionContext context,
Subscription sub,
MessageAck ack,
MessageReference node) |
void |
addProducer(ConnectionContext context,
ProducerInfo info) |
void |
addSubscription(ConnectionContext context,
Subscription sub) |
Message[] |
browse() |
boolean |
canGC() |
void |
clearPendingMessages() |
void |
deleteSubscription(ConnectionContext context,
SubscriptionKey key) |
void |
dispose(ConnectionContext context) |
void |
duplicateFromStore(Message message,
Subscription subscription) |
void |
fastProducer(ConnectionContext context,
ProducerInfo producerInfo)
Called to notify a producer is too fast
|
void |
gc() |
ActiveMQDestination |
getActiveMQDestination() |
<T> T |
getAdaptor(Class<? extends T> clazz) |
long |
getBlockedProducerWarningInterval() |
List<Subscription> |
getConsumers() |
int |
getCursorMemoryHighWaterMark() |
DeadLetterStrategy |
getDeadLetterStrategy() |
DestinationStatistics |
getDestinationStatistics() |
long |
getInactiveTimeoutBeforeGC() |
int |
getMaxAuditDepth() |
int |
getMaxBrowsePageSize() |
int |
getMaxPageSize() |
int |
getMaxProducersToAudit() |
MemoryUsage |
getMemoryUsage() |
MessageStore |
getMessageStore() |
int |
getMinimumMessageSize() |
String |
getName() |
Destination |
getNext() |
SlowConsumerStrategy |
getSlowConsumerStrategy() |
boolean |
isActive() |
boolean |
isAlwaysRetroactive() |
boolean |
isDisposed() |
boolean |
isDoOptimzeMessageStorage() |
boolean |
isEnableAudit() |
void |
isFull(ConnectionContext context,
Usage<?> usage)
Called when a Usage reaches a limit
|
boolean |
isLazyDispatch() |
boolean |
isPrioritizedMessages() |
boolean |
isProducerFlowControl() |
boolean |
isUseCache() |
boolean |
iterate() |
void |
markForGC(long timeStamp) |
void |
messageConsumed(ConnectionContext context,
MessageReference messageReference)
called when message is consumed
|
void |
messageDelivered(ConnectionContext context,
MessageReference messageReference)
Called when message is delivered to the broker
|
void |
messageDiscarded(ConnectionContext context,
Subscription sub,
MessageReference messageReference)
Called when a message is discarded - e.g.
|
void |
messageExpired(ConnectionContext context,
PrefetchSubscription prefetchSubscription,
MessageReference node) |
void |
messageExpired(ConnectionContext context,
Subscription subs,
MessageReference node)
Inform the Destination a message has expired
|
void |
processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
called on Queues in slave mode to allow dispatch to follow subscription
choice of master
|
void |
removeProducer(ConnectionContext context,
ProducerInfo info) |
void |
removeSubscription(ConnectionContext context,
Subscription sub,
long lastDeliveredSequenceId) |
void |
send(ProducerBrokerExchange context,
Message messageSend) |
protected void |
send(ProducerBrokerExchange context,
Message message,
ActiveMQDestination destination)
Sends a message to the given destination which may be a wildcard
|
void |
setAlwaysRetroactive(boolean value) |
void |
setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
Set's the interval at which warnings about producers being blocked by
resource usage will be triggered.
|
void |
setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) |
void |
setDoOptimzeMessageStorage(boolean doOptimzeMessageStorage) |
void |
setEnableAudit(boolean enableAudit) |
void |
setLazyDispatch(boolean value)
set the lazy dispatch - default is false
|
void |
setMaxAuditDepth(int maxAuditDepth) |
void |
setMaxBrowsePageSize(int maxPageSize) |
void |
setMaxPageSize(int maxPageSize) |
void |
setMaxProducersToAudit(int maxProducersToAudit) |
void |
setMemoryUsage(MemoryUsage memoryUsage) |
void |
setMinimumMessageSize(int minimumMessageSize) |
void |
setProducerFlowControl(boolean value) |
void |
setUseCache(boolean useCache) |
void |
slowConsumer(ConnectionContext context,
Subscription subs)
Called when there is a slow consumer
|
void |
start() |
void |
stop() |
void |
wakeup()
optionally called by a Subscriber - to inform the Destination its ready
for more messages
|
protected final Destination next
public DestinationFilter(Destination next)
public void acknowledge(ConnectionContext context, Subscription sub, MessageAck ack, MessageReference node) throws IOException
acknowledge
in interface Destination
IOException
public void addSubscription(ConnectionContext context, Subscription sub) throws Exception
addSubscription
in interface Destination
Exception
public Message[] browse()
browse
in interface Destination
public void dispose(ConnectionContext context) throws IOException
dispose
in interface Destination
IOException
public boolean isDisposed()
isDisposed
in interface Destination
public void gc()
gc
in interface Destination
public void markForGC(long timeStamp)
markForGC
in interface Destination
public boolean canGC()
canGC
in interface Destination
public long getInactiveTimeoutBeforeGC()
getInactiveTimeoutBeforeGC
in interface Destination
public ActiveMQDestination getActiveMQDestination()
getActiveMQDestination
in interface Destination
public DeadLetterStrategy getDeadLetterStrategy()
getDeadLetterStrategy
in interface Destination
public DestinationStatistics getDestinationStatistics()
getDestinationStatistics
in interface Destination
public String getName()
getName
in interface Destination
public MemoryUsage getMemoryUsage()
getMemoryUsage
in interface Destination
getMemoryUsage
in interface Message.MessageDestination
public void setMemoryUsage(MemoryUsage memoryUsage)
setMemoryUsage
in interface Destination
public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception
removeSubscription
in interface Destination
Exception
public void send(ProducerBrokerExchange context, Message messageSend) throws Exception
send
in interface Destination
Exception
public List<Subscription> getConsumers()
getConsumers
in interface Destination
protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception
context
- broker contextmessage
- message to senddestination
- possibly wildcard destination to send the message toException
- on errorpublic MessageStore getMessageStore()
getMessageStore
in interface Destination
public boolean isProducerFlowControl()
isProducerFlowControl
in interface Destination
public void setProducerFlowControl(boolean value)
setProducerFlowControl
in interface Destination
public boolean isAlwaysRetroactive()
isAlwaysRetroactive
in interface Destination
public void setAlwaysRetroactive(boolean value)
setAlwaysRetroactive
in interface Destination
public void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
Destination
setBlockedProducerWarningInterval
in interface Destination
blockedProducerWarningInterval
- the interval at which warning about
blocked producers will be triggered.public long getBlockedProducerWarningInterval()
getBlockedProducerWarningInterval
in interface Destination
public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception
addProducer
in interface Destination
Exception
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception
removeProducer
in interface Destination
Exception
public int getMaxAuditDepth()
getMaxAuditDepth
in interface Destination
public int getMaxProducersToAudit()
getMaxProducersToAudit
in interface Destination
public boolean isEnableAudit()
isEnableAudit
in interface Destination
public void setEnableAudit(boolean enableAudit)
setEnableAudit
in interface Destination
public void setMaxAuditDepth(int maxAuditDepth)
setMaxAuditDepth
in interface Destination
public void setMaxProducersToAudit(int maxProducersToAudit)
setMaxProducersToAudit
in interface Destination
public boolean isActive()
isActive
in interface Destination
public int getMaxPageSize()
getMaxPageSize
in interface Destination
public void setMaxPageSize(int maxPageSize)
setMaxPageSize
in interface Destination
public boolean isUseCache()
isUseCache
in interface Destination
public void setUseCache(boolean useCache)
setUseCache
in interface Destination
public int getMinimumMessageSize()
getMinimumMessageSize
in interface Destination
getMinimumMessageSize
in interface Message.MessageDestination
public void setMinimumMessageSize(int minimumMessageSize)
setMinimumMessageSize
in interface Destination
public void wakeup()
Destination
wakeup
in interface Destination
public boolean isLazyDispatch()
isLazyDispatch
in interface Destination
public void setLazyDispatch(boolean value)
Destination
setLazyDispatch
in interface Destination
public void messageExpired(ConnectionContext context, PrefetchSubscription prefetchSubscription, MessageReference node)
public void fastProducer(ConnectionContext context, ProducerInfo producerInfo)
Destination
fastProducer
in interface Destination
public void isFull(ConnectionContext context, Usage<?> usage)
Destination
isFull
in interface Destination
public void messageConsumed(ConnectionContext context, MessageReference messageReference)
Destination
messageConsumed
in interface Destination
public void messageDelivered(ConnectionContext context, MessageReference messageReference)
Destination
messageDelivered
in interface Destination
public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference)
Destination
messageDiscarded
in interface Destination
public void slowConsumer(ConnectionContext context, Subscription subs)
Destination
slowConsumer
in interface Destination
public void messageExpired(ConnectionContext context, Subscription subs, MessageReference node)
Destination
messageExpired
in interface Destination
public int getMaxBrowsePageSize()
getMaxBrowsePageSize
in interface Destination
public void setMaxBrowsePageSize(int maxPageSize)
setMaxBrowsePageSize
in interface Destination
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception
Destination
processDispatchNotification
in interface Destination
Exception
public int getCursorMemoryHighWaterMark()
getCursorMemoryHighWaterMark
in interface Destination
public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark)
setCursorMemoryHighWaterMark
in interface Destination
public boolean isPrioritizedMessages()
isPrioritizedMessages
in interface Destination
public SlowConsumerStrategy getSlowConsumerStrategy()
getSlowConsumerStrategy
in interface Destination
public boolean isDoOptimzeMessageStorage()
isDoOptimzeMessageStorage
in interface Destination
public void setDoOptimzeMessageStorage(boolean doOptimzeMessageStorage)
setDoOptimzeMessageStorage
in interface Destination
public void clearPendingMessages()
clearPendingMessages
in interface Destination
public void duplicateFromStore(Message message, Subscription subscription)
duplicateFromStore
in interface Destination
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception
Exception
public Destination getNext()
public <T> T getAdaptor(Class<? extends T> clazz)
Copyright © 2005–2016 The Apache Software Foundation. All rights reserved.