|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.channel.AbstractMessageChannel org.springframework.integration.channel.AbstractPollableChannel org.springframework.integration.channel.QueueChannel org.springframework.integration.channel.PriorityChannel
public class PriorityChannel
A message channel that prioritizes messages based on a Comparator
.
The default comparator is based upon the message header's 'priority'.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannel |
---|
AbstractMessageChannel.ChannelInterceptorList |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
protected Message<?> |
doReceive(long timeout)
Subclasses must implement this method. |
protected boolean |
doSend(Message<?> message,
long timeout)
Subclasses must implement this method. |
Methods inherited from class org.springframework.integration.channel.QueueChannel |
---|
clear, getMesssageCount, getRemainingCapacity, purge |
Methods inherited from class org.springframework.integration.channel.AbstractPollableChannel |
---|
receive, receive |
Methods inherited from class org.springframework.integration.channel.AbstractMessageChannel |
---|
addInterceptor, getInterceptors, getName, send, send, setBeanName, setInterceptors, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.integration.core.MessageChannel |
---|
getName, send, send |
Constructor Detail |
---|
public PriorityChannel(int capacity, java.util.Comparator<Message<?>> comparator)
Comparator
. If the comparator
is null
, the priority will be based upon the value of
MessageHeader#getPriority()
.
public PriorityChannel(int capacity)
MessageHeader#getPriority()
.
public PriorityChannel(java.util.Comparator<Message<?>> comparator)
Comparator
. If the comparator
is null
, the priority will be based upon the value of
MessageHeader#getPriority()
.
public PriorityChannel()
MessageHeader#getPriority()
.
Method Detail |
---|
protected boolean doSend(Message<?> message, long timeout)
AbstractMessageChannel
doSend
in class QueueChannel
protected Message<?> doReceive(long timeout)
AbstractPollableChannel
doReceive
in class QueueChannel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |