public class PriorityChannel extends QueueChannel
Comparator
.
The default comparator is based upon the message header's 'priority'.AbstractMessageChannel.ChannelInterceptorList
logger
Constructor and Description |
---|
PriorityChannel()
Create a channel with an unbounded queue.
|
PriorityChannel(java.util.Comparator<Message<?>> comparator)
Create a channel with an unbounded queue.
|
PriorityChannel(int capacity)
Create a channel with the specified queue capacity.
|
PriorityChannel(int capacity,
java.util.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, purge
receive, receive
addInterceptor, getComponentType, getFullChannelName, getInterceptors, send, send, setConversionService, setDatatypes, setInterceptors, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
send, send
getComponentName
public PriorityChannel(int capacity, java.util.Comparator<Message<?>> comparator)
Comparator
. If the comparator
is null
, the priority will be based upon the value of
MessageHeaders.getPriority()
.public PriorityChannel(int capacity)
MessageHeaders.getPriority()
.public PriorityChannel(java.util.Comparator<Message<?>> comparator)
Comparator
. If the comparator
is null
, the priority will be based upon the value of
MessageHeaders.getPriority()
.public PriorityChannel()
MessageHeaders.getPriority()
.protected boolean doSend(Message<?> message, long timeout)
AbstractMessageChannel
doSend
in class QueueChannel
protected Message<?> doReceive(long timeout)
AbstractPollableChannel
doReceive
in class QueueChannel