public interface ChannelInterceptor
Messages
being sent-to and/or received-from a
MessageChannel
.Modifier and Type | Method and Description |
---|---|
void |
afterReceiveCompletion(Message<?> message,
MessageChannel channel,
Exception ex)
Invoked after the completion of a receive regardless of any exception that
have been raised thus allowing for proper resource cleanup.
|
void |
afterSendCompletion(Message<?> message,
MessageChannel channel,
boolean sent,
Exception ex)
Invoked after the completion of a send regardless of any exception that
have been raised thus allowing for proper resource cleanup.
|
Message<?> |
postReceive(Message<?> message,
MessageChannel channel)
Invoked immediately after a Message has been retrieved but before
it is returned to the caller.
|
void |
postSend(Message<?> message,
MessageChannel channel,
boolean sent)
Invoked immediately after the send invocation.
|
boolean |
preReceive(MessageChannel channel)
Invoked as soon as receive is called and before a Message is
actually retrieved.
|
Message<?> |
preSend(Message<?> message,
MessageChannel channel)
Invoked before the Message is actually sent to the channel.
|
Message<?> preSend(Message<?> message, MessageChannel channel)
null
then the actual
send invocation will not occur.void postSend(Message<?> message, MessageChannel channel, boolean sent)
void afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, Exception ex)
Note that this will be invoked only if preSend successfully completed
and returned a Message, i.e. it did not return null
.
boolean preReceive(MessageChannel channel)
Message<?> postReceive(Message<?> message, MessageChannel channel)
void afterReceiveCompletion(Message<?> message, MessageChannel channel, Exception ex)
Note that this will be invoked only if preReceive successfully
completed and returned true
.