ChannelInterceptor has default methods (made
possible by a Java 8 baseline) and can be implemented directly without the
need for this no-op adapter@Deprecated public abstract class ChannelInterceptorAdapter extends Object implements ChannelInterceptor
ChannelInterceptor base class with empty method implementations
as a convenience.| Constructor and Description |
|---|
ChannelInterceptorAdapter()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterReceiveCompletion(Message<?> message,
MessageChannel channel,
Exception ex)
Deprecated.
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)
Deprecated.
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)
Deprecated.
Invoked immediately after a Message has been retrieved but before
it is returned to the caller.
|
void |
postSend(Message<?> message,
MessageChannel channel,
boolean sent)
Deprecated.
Invoked immediately after the send invocation.
|
boolean |
preReceive(MessageChannel channel)
Deprecated.
Invoked as soon as receive is called and before a Message is
actually retrieved.
|
Message<?> |
preSend(Message<?> message,
MessageChannel channel)
Deprecated.
Invoked before the Message is actually sent to the channel.
|
public Message<?> preSend(Message<?> message, MessageChannel channel)
ChannelInterceptornull then the actual
send invocation will not occur.preSend in interface ChannelInterceptorpublic void postSend(Message<?> message, MessageChannel channel, boolean sent)
ChannelInterceptorpostSend in interface ChannelInterceptorpublic void afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, @Nullable Exception ex)
ChannelInterceptorNote that this will be invoked only if ChannelInterceptor.preSend(org.springframework.messaging.Message<?>, org.springframework.messaging.MessageChannel) successfully
completed and returned a Message, i.e. it did not return null.
afterSendCompletion in interface ChannelInterceptorpublic boolean preReceive(MessageChannel channel)
ChannelInterceptorpreReceive in interface ChannelInterceptorpublic Message<?> postReceive(Message<?> message, MessageChannel channel)
ChannelInterceptornull aborts further interceptor invocations.
This only applies to PollableChannels.postReceive in interface ChannelInterceptorpublic void afterReceiveCompletion(@Nullable Message<?> message, MessageChannel channel, @Nullable Exception ex)
ChannelInterceptorNote that this will be invoked only if ChannelInterceptor.preReceive(org.springframework.messaging.MessageChannel) successfully
completed and returned true.
afterReceiveCompletion in interface ChannelInterceptor