public class PriorityChannel extends QueueChannel
Comparator.
The default comparator is based upon the message header's 'priority'.AbstractMessageChannel.ChannelInterceptorListIntegrationManagement.ManagementOverridesqueueSemaphoreinterceptors, metersEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEINDEFINITE_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.
|
PriorityChannel(MessageGroupQueue messageGroupQueue)
Create a channel based on the provided
MessageGroupQueue. |
PriorityChannel(PriorityCapableChannelMessageStore messageGroupStore,
Object groupId)
Create a channel based on the provided
PriorityCapableChannelMessageStore
and group id for message store operations. |
| 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.
|
int |
getRemainingCapacity()
Obtain the remaining capacity of this channel.
|
clear, getQueueSize, purgeaddInterceptor, addInterceptor, getReceiveCount, getReceiveCountLong, getReceiveErrorCount, getReceiveErrorCountLong, hasExecutorInterceptors, receive, receive, removeInterceptor, removeInterceptor, setInterceptorsconfigureMetrics, destroy, getComponentType, getErrorRate, getFullChannelName, getIChannelInterceptorList, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMetricsCaptor, getMinSendDuration, getOverrides, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onInit, registerMetricsCaptor, reset, send, send, setCountsEnabled, setDatatypes, setLoggingEnabled, setMessageConverter, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetReceiveCount, getReceiveCountLong, getReceiveErrorCount, getReceiveErrorCountLong, receiveCount, receiveErrorCountisStatsEnabled, setStatsEnableddestroy, getOverrides, isCountsEnabled, isLoggingEnabled, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabledsend, sendgetChannelInterceptorsgetInterceptorsgetBeanName, getComponentNamesendCount, sendErrorCountpublic PriorityChannel()
IntegrationMessageHeaderAccessor.getPriority().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(int capacity,
@Nullable
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(PriorityCapableChannelMessageStore messageGroupStore, Object groupId)
PriorityCapableChannelMessageStore
and group id for message store operations.messageGroupStore - the PriorityCapableChannelMessageStore to use.groupId - to group message for this channel in the message store.public PriorityChannel(MessageGroupQueue messageGroupQueue)
MessageGroupQueue.messageGroupQueue - the MessageGroupQueue to use.public int getRemainingCapacity()
QueueChannelOperationsgetRemainingCapacity in interface QueueChannelOperationsgetRemainingCapacity in interface QueueChannelManagementgetRemainingCapacity in class QueueChannelprotected 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.