|
|||||||||
| 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.dispatcher.DirectChannel
public class DirectChannel
A channel that invokes the subscribed handler(s) in a
sender's thread (returning after at most one handles the message). If a
MessageSource is provided, then that source will likewise be polled
within a receiver's thread.
| Field Summary | |
|---|---|
private SimpleDispatcher |
dispatcher
|
private java.util.concurrent.atomic.AtomicInteger |
handlerCount
|
private MessageSource<?> |
source
|
| Constructor Summary | |
|---|---|
DirectChannel()
|
|
DirectChannel(MessageSource<?> source)
|
|
| 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. |
boolean |
subscribe(MessageTarget target)
Register a MessageTarget as a subscriber to this source. |
boolean |
unsubscribe(MessageTarget target)
Remove a MessageTarget from the subscribers of this source. |
| Methods inherited from class org.springframework.integration.channel.AbstractMessageChannel |
|---|
addInterceptor, 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 volatile MessageSource<?> source
private final SimpleDispatcher dispatcher
private final java.util.concurrent.atomic.AtomicInteger handlerCount
| Constructor Detail |
|---|
public DirectChannel()
public DirectChannel(MessageSource<?> source)
| Method Detail |
|---|
public boolean subscribe(MessageTarget target)
SubscribableMessageTarget as a subscriber to this source.
subscribe in interface Subscribablepublic boolean unsubscribe(MessageTarget target)
SubscribableMessageTarget from the subscribers of this source.
unsubscribe in interface Subscribableprotected Message<?> doReceive(long timeout)
AbstractMessageChannel
doReceive in class AbstractMessageChannel
protected boolean doSend(Message<?> message,
long timeout)
AbstractMessageChannel
doSend in class AbstractMessageChannelpublic java.util.List<Message<?>> clear()
MessageChannelMessages from this channel.
clear in interface MessageChannelpublic java.util.List<Message<?>> purge(MessageSelector selector)
MessageChannelMessages that are not accepted by the provided selector.
purge in interface MessageChannel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||