public class PriorityChannel extends QueueChannel
Comparator.
The default comparator is based upon the message header's 'priority'.AbstractMessageChannel.ChannelInterceptorListqueueSemaphoreloggerINDEFINITE_TIMEOUT| Constructor and Description |
|---|
PriorityChannel()
Create a channel with an unbounded queue.
|
PriorityChannel(Comparator<Message<?>> comparator)
Create a channel with an unbounded queue.
|
PriorityChannel(int capacity)
Create a channel with the specified queue capacity.
|
PriorityChannel(int capacity,
Comparator<Message<?>> comparator)
Create a channel with the specified queue capacity.
|
| Modifier and Type | Method and Description |
|---|---|
protected Message<?> |
doReceive(long timeout)
Subclasses must implement this method.
|
protected boolean |
doSend(Message<?> message,
long timeout)
Subclasses must implement this method.
|
clear, getQueueSize, getRemainingCapacity, purgegetReceiveCount, getReceiveCountLong, getReceiveErrorCount, getReceiveErrorCountLong, receive, receiveaddInterceptor, addInterceptor, configureMetrics, enableCounts, enableStats, getChannelInterceptors, getComponentType, getErrorRate, getFullChannelName, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMinSendDuration, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onInit, removeInterceptor, removeInterceptor, reset, send, send, setConversionService, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setShouldTrackafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setMessageBuilderFactory, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetReceiveCount, getReceiveCountLong, getReceiveErrorCount, getReceiveErrorCountLonggetErrorRate, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMinSendDuration, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSendenableStats, isStatsEnabledenableCounts, isCountsEnabled, isLoggingEnabled, reset, setLoggingEnabledsend, sendgetComponentNamepublic PriorityChannel(int capacity,
Comparator<Message<?>> comparator)
Comparator. If the comparator
is null, the priority will be based upon the value of
IntegrationMessageHeaderAccessor.getPriority().capacity - The capacity.comparator - The comparator.public PriorityChannel(int capacity)
IntegrationMessageHeaderAccessor.getPriority().capacity - The queue capacity.public PriorityChannel(Comparator<Message<?>> comparator)
Comparator. If the comparator
is null, the priority will be based upon the value of
IntegrationMessageHeaderAccessor.getPriority().comparator - The comparator.public PriorityChannel()
IntegrationMessageHeaderAccessor.getPriority().protected boolean doSend(Message<?> message, long timeout)
AbstractMessageChanneldoSend in class QueueChannelmessage - The message.timeout - The timeout.protected Message<?> doReceive(long timeout)
AbstractPollableChanneldoReceive in class QueueChanneltimeout - The timeout.