public class PriorityChannel extends QueueChannel
Comparator.
The default comparator is based upon the message header's 'priority'.AbstractMessageChannel.ChannelInterceptorListIntegrationManagement.ManagementOverridesqueueSemaphoreinterceptors, metersEXPRESSION_PARSER, loggerINDEFINITE_TIMEOUTMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| 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, destroy, getQueueSize, purge, registerMetricsCaptoraddInterceptor, addInterceptor, getIntegrationPatternType, hasExecutorInterceptors, receive, receive, removeInterceptor, removeInterceptor, setInterceptorsgetComponentType, getFullChannelName, getIChannelInterceptorList, getInterceptors, getMetricsCaptor, getOverrides, isLoggingEnabled, onInit, send, send, setDatatypes, setLoggingEnabled, setMessageConverter, setShouldTrackafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, 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, waitsend, sendgetInterceptorsgetManagedName, getManagedType, getThisAs, setManagedName, setManagedTypegetBeanName, getComponentNamepublic PriorityChannel()
StaticMessageHeaderAccessor.getPriority(Message).public PriorityChannel(int capacity)
StaticMessageHeaderAccessor.getPriority(Message).capacity - The queue capacity.public PriorityChannel(Comparator<Message<?>> comparator)
Comparator. If the comparator
is null, the priority will be based upon the value of
StaticMessageHeaderAccessor.getPriority(Message).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
StaticMessageHeaderAccessor.getPriority(Message).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 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.