|
|||||||||
| 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.AbstractPollableChannel
org.springframework.integration.channel.QueueChannel
public class QueueChannel
Simple implementation of a message channel. Each Message is placed in
a BlockingQueue whose capacity may be specified upon construction.
The capacity must be a positive integer value. For a zero-capacity version
based upon a SynchronousQueue, consider the
RendezvousChannel.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannel |
|---|
AbstractMessageChannel.ChannelInterceptorList |
| Field Summary | |
|---|---|
static int |
DEFAULT_CAPACITY
|
private java.util.concurrent.BlockingQueue<Message<?>> |
queue
|
| Constructor Summary | |
|---|---|
QueueChannel()
Create a channel with the default queue capacity. |
|
QueueChannel(java.util.concurrent.BlockingQueue<Message<?>> queue)
Create a channel with the specified queue. |
|
QueueChannel(int capacity)
Create a channel with the specified queue capacity. |
|
| Method Summary | |
|---|---|
java.util.List<Message<?>> |
clear()
Remove all Messages from this channel. |
protected Message<?> |
doReceive(long timeout)
Subclasses must implement this method. |
protected boolean |
doSend(Message<?> message,
long timeout)
Subclasses must implement this method. |
java.util.List<Message<?>> |
purge(MessageSelector selector)
Remove any Messages that are not accepted by the provided selector. |
| 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.channel.MessageChannel |
|---|
getName |
| Methods inherited from interface org.springframework.integration.message.BlockingTarget |
|---|
send, send |
| Field Detail |
|---|
public static final int DEFAULT_CAPACITY
private final java.util.concurrent.BlockingQueue<Message<?>> queue
| Constructor Detail |
|---|
public QueueChannel(java.util.concurrent.BlockingQueue<Message<?>> queue)
public QueueChannel(int capacity)
public QueueChannel()
DEFAULT_CAPACITY| Method Detail |
|---|
protected boolean doSend(Message<?> message,
long timeout)
AbstractMessageChannel
doSend in class AbstractMessageChannelprotected Message<?> doReceive(long timeout)
AbstractPollableChannel
doReceive in class AbstractPollableChannelpublic java.util.List<Message<?>> clear()
PollableChannelMessages from this channel.
public java.util.List<Message<?>> purge(MessageSelector selector)
PollableChannelMessages that are not accepted by the provided selector.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||