|
Spring Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.integration.context.IntegrationObjectSupport
org.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 |
| Constructor Summary | |
|---|---|
QueueChannel()
Create a channel with "unbounded" queue capacity. |
|
QueueChannel(BlockingQueue<Message<?>> queue)
Create a channel with the specified queue. |
|
QueueChannel(int capacity)
Create a channel with the specified queue capacity. |
|
| Method Summary | |
|---|---|
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. |
int |
getQueueSize()
|
int |
getRemainingCapacity()
|
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, getComponentType, getInterceptors, send, send, setConversionService, setDatatypes, setInterceptors, setShouldTrack |
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getRequiredMetadataPersister, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setTaskScheduler, 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.MessageChannel |
|---|
send, send |
| Methods inherited from interface org.springframework.integration.context.NamedComponent |
|---|
getComponentName |
| Constructor Detail |
|---|
public QueueChannel(BlockingQueue<Message<?>> queue)
public QueueChannel(int capacity)
public QueueChannel()
Integer.MAX_VALUE. Note that a bounded queue is recommended, since an
unbounded queue may lead to OutOfMemoryErrors.
| Method Detail |
|---|
protected boolean doSend(Message<?> message,
long timeout)
AbstractMessageChannel
doSend in class AbstractMessageChannelprotected Message<?> doReceive(long timeout)
AbstractPollableChannel
doReceive in class AbstractPollableChannelpublic List<Message<?>> clear()
Messages from this channel.
public List<Message<?>> purge(MessageSelector selector)
Messages that are not accepted by the provided selector.
public int getQueueSize()
public int getRemainingCapacity()
|
Spring Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||