|
|||||||||
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
Source
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 Source<?> |
source
|
Constructor Summary | |
---|---|
DirectChannel()
|
|
DirectChannel(Source<?> source)
|
Method Summary | |
---|---|
java.util.List<Message<?>> |
clear()
Remove all Messages from this channel. |
private static DispatcherPolicy |
defaultDispatcherPolicy()
|
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(Target target)
Register a Target as a subscriber to this source. |
boolean |
unsubscribe(Target target)
Remove a Target from the subscribers of this source. |
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 volatile Source<?> source
private final SimpleDispatcher dispatcher
private final java.util.concurrent.atomic.AtomicInteger handlerCount
Constructor Detail |
---|
public DirectChannel()
public DirectChannel(Source<?> source)
Method Detail |
---|
public boolean subscribe(Target target)
Subscribable
Target
as a subscriber to this source.
subscribe
in interface Subscribable
public boolean unsubscribe(Target target)
Subscribable
Target
from the subscribers of this source.
unsubscribe
in interface Subscribable
protected Message<?> doReceive(long timeout)
AbstractMessageChannel
doReceive
in class AbstractMessageChannel
protected boolean doSend(Message<?> message, long timeout)
AbstractMessageChannel
doSend
in class AbstractMessageChannel
public java.util.List<Message<?>> clear()
MessageChannel
Messages
from this channel.
clear
in interface MessageChannel
public java.util.List<Message<?>> purge(MessageSelector selector)
MessageChannel
Messages
that are not accepted by the provided selector.
purge
in interface MessageChannel
private static DispatcherPolicy defaultDispatcherPolicy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |