|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.channel.AbstractMessageChannel
org.springframework.integration.channel.QueueChannel
org.springframework.integration.channel.PriorityChannel
public class PriorityChannel
A message channel that prioritizes messages based on a PriorityChannel.MessagePriorityComparator.
The default comparator is based upon the message header's 'priority'.
| Nested Class Summary | |
|---|---|
private static class |
PriorityChannel.MessagePriorityComparator
|
| Field Summary | |
|---|---|
private java.util.concurrent.Semaphore |
semaphore
|
| Fields inherited from class org.springframework.integration.channel.QueueChannel |
|---|
DEFAULT_CAPACITY |
| Constructor Summary | |
|---|---|
PriorityChannel()
Create a channel with the default queue capacity and dispatcher policy. |
|
PriorityChannel(int capacity)
Create a channel with the specified queue capacity and default dispatcher policy. |
|
PriorityChannel(int capacity,
DispatcherPolicy dispatcherPolicy)
Create a channel with the specified queue capacity and dispatcher policy. |
|
PriorityChannel(int capacity,
DispatcherPolicy dispatcherPolicy,
java.util.Comparator<Message<?>> comparator)
Create a channel with the specified queue capacity and dispatcher policy. |
|
| 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, purge |
| Methods inherited from class org.springframework.integration.channel.AbstractMessageChannel |
|---|
addInterceptor, getDispatcherPolicy, getName, receive, receive, send, send, setBeanName, setInterceptors, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final java.util.concurrent.Semaphore semaphore
| Constructor Detail |
|---|
public PriorityChannel(int capacity,
DispatcherPolicy dispatcherPolicy,
java.util.Comparator<Message<?>> comparator)
PriorityChannel.MessagePriorityComparator.
public PriorityChannel(int capacity,
DispatcherPolicy dispatcherPolicy)
MessageHeader.getPriority().
public PriorityChannel(int capacity)
MessageHeader.getPriority().
public PriorityChannel()
MessageHeader.getPriority().
| Method Detail |
|---|
protected boolean doSend(Message<?> message,
long timeout)
AbstractMessageChannel
doSend in class QueueChannelprotected Message<?> doReceive(long timeout)
AbstractMessageChannel
doReceive in class QueueChannel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||