AbstractMessageChannel

Abstract base class for {@link MessageChannel} implementations.

@author Rossen Stoyanchev @since 4.0

Constructors

this
this()
Undocumented in source.

Members

Classes

ChannelInterceptorChain
class ChannelInterceptorChain

Assists with the invocation of the configured channel interceptors.

Functions

addInterceptor
void addInterceptor(ChannelInterceptor interceptor)
Undocumented in source. Be warned that the author may not have intended to support it.
addInterceptor
void addInterceptor(int index, ChannelInterceptor interceptor)
Undocumented in source. Be warned that the author may not have intended to support it.
getBeanName
string getBeanName()

Return the bean name for this message channel.

getInterceptors
List!(ChannelInterceptor) getInterceptors()
Undocumented in source. Be warned that the author may not have intended to support it.
removeInterceptor
bool removeInterceptor(ChannelInterceptor interceptor)
Undocumented in source. Be warned that the author may not have intended to support it.
removeInterceptor
ChannelInterceptor removeInterceptor(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
send
bool send(MessageBase message, long timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
sendInternal
bool sendInternal(MessageBase message, long timeout)
Undocumented in source.
setBeanName
void setBeanName(string name)

A message channel uses the bean name primarily for logging purposes.

setInterceptors
void setInterceptors(ChannelInterceptor[] interceptors)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

id
string id;
Undocumented in source.

Inherited Members

From MessageChannel

INDEFINITE_TIMEOUT
enum long INDEFINITE_TIMEOUT;

Constant for sending a message without a prescribed timeout.

send
bool send(MessageBase message)

Send a {@link Message} to this channel. If the message is sent successfully, the method returns {@code true}. If the message cannot be sent due to a non-fatal reason, the method returns {@code false}. The method may also throw a RuntimeException in case of non-recoverable errors. <p>This method may block indefinitely, depending on the implementation. To provide a maximum wait time, use {@link #send(Message, long)}. @param message the message to send @return whether or not the message was sent

send
bool send(MessageBase message, long timeout)

Send a message, blocking until either the message is accepted or the specified timeout period elapses. @param message the message to send @param timeout the timeout in milliseconds or {@link #INDEFINITE_TIMEOUT} @return {@code true} if the message is sent, {@code false} if not including a timeout of an interrupt of the send

From InterceptableChannel

setInterceptors
void setInterceptors(ChannelInterceptor[] interceptors)

Set the list of channel interceptors clearing any existing interceptors.

addInterceptor
void addInterceptor(ChannelInterceptor interceptor)

Add a channel interceptor to the end of the list.

addInterceptor
void addInterceptor(int index, ChannelInterceptor interceptor)

Add a channel interceptor at the specified index.

getInterceptors
List!(ChannelInterceptor) getInterceptors()

Return the list of configured interceptors.

removeInterceptor
bool removeInterceptor(ChannelInterceptor interceptor)

Remove the given interceptor.

removeInterceptor
ChannelInterceptor removeInterceptor(int index)

Remove the interceptor at the given index.

Meta