|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.channel.AbstractMessageChannel
public abstract class AbstractMessageChannel
Base class for MessageChannel implementations providing common
properties such as the channel name. Also provides the common functionality
for sending and receiving Messages including the invocation
of any ChannelInterceptors.
| Nested Class Summary | |
|---|---|
protected class |
AbstractMessageChannel.ChannelInterceptorList
A convenience wrapper class for the list of ChannelInterceptors. |
| Constructor Summary | |
|---|---|
AbstractMessageChannel()
|
|
| Method Summary | |
|---|---|
void |
addInterceptor(ChannelInterceptor interceptor)
Add a channel interceptor to the end of the list. |
protected abstract boolean |
doSend(Message<?> message,
long timeout)
Subclasses must implement this method. |
protected AbstractMessageChannel.ChannelInterceptorList |
getInterceptors()
Exposes the interceptor list for subclasses. |
java.lang.String |
getName()
Return the name of this channel. |
boolean |
send(Message<?> message)
Send a message on this channel. |
boolean |
send(Message<?> message,
long timeout)
Send a message on this channel. |
void |
setBeanName(java.lang.String name)
Set the name of this channel. |
void |
setInterceptors(java.util.List<ChannelInterceptor> interceptors)
Set the list of channel interceptors. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractMessageChannel()
| Method Detail |
|---|
public void setBeanName(java.lang.String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic java.lang.String getName()
getName in interface MessageChannelpublic void setInterceptors(java.util.List<ChannelInterceptor> interceptors)
public void addInterceptor(ChannelInterceptor interceptor)
protected AbstractMessageChannel.ChannelInterceptorList getInterceptors()
public final boolean send(Message<?> message)
send in interface MessageChannelmessage - the Message to send
true if the message is sent successfully or
false if the sending thread is interrupted.
public final boolean send(Message<?> message,
long timeout)
send(Message)).
send in interface MessageChannelmessage - the Message to sendtimeout - the timeout in milliseconds
true if the message is sent successfully,
false if the message cannot be sent within the allotted
time or the sending thread is interrupted.public java.lang.String toString()
toString in class java.lang.Object
protected abstract boolean doSend(Message<?> message,
long timeout)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||