类 ChannelInterceptorAdapter
- java.lang.Object
- org.springframework.messaging.support.ChannelInterceptorAdapter
- 所有已实现的接口:
ChannelInterceptor
@Deprecated public abstract class ChannelInterceptorAdapter extends Object implements ChannelInterceptor
已过时。as of 5.0.7ChannelInterceptor
has default methods (made possible by a Java 8 baseline) and can be implemented directly without the need for this no-op adapterAChannelInterceptor
base class with empty method implementations as a convenience.- 从以下版本开始:
- 4.0
- 作者:
- Mark Fisher, Rossen Stoyanchev
构造器概要
构造器 构造器 说明 ChannelInterceptorAdapter()
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 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.
构造器详细资料
ChannelInterceptorAdapter
public ChannelInterceptorAdapter()
已过时。
方法详细资料
preSend
public Message<?> preSend(Message<?> message, MessageChannel channel)
已过时。从接口复制的说明:ChannelInterceptor
Invoked before the Message is actually sent to the channel. This allows for modification of the Message if necessary. If this method returnsnull
then the actual send invocation will not occur.- 指定者:
preSend
在接口中ChannelInterceptor
postSend
public void postSend(Message<?> message, MessageChannel channel, boolean sent)
已过时。从接口复制的说明:ChannelInterceptor
Invoked immediately after the send invocation. The boolean value argument represents the return value of that invocation.- 指定者:
postSend
在接口中ChannelInterceptor
afterSendCompletion
public void afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, @Nullable Exception ex)
已过时。从接口复制的说明:ChannelInterceptor
Invoked after the completion of a send regardless of any exception that have been raised thus allowing for proper resource cleanup.Note 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 returnnull
.- 指定者:
afterSendCompletion
在接口中ChannelInterceptor
preReceive
public boolean preReceive(MessageChannel channel)
已过时。从接口复制的说明:ChannelInterceptor
Invoked as soon as receive is called and before a Message is actually retrieved. If the return value is 'false', then no Message will be retrieved. This only applies to PollableChannels.- 指定者:
preReceive
在接口中ChannelInterceptor
postReceive
public Message<?> postReceive(Message<?> message, MessageChannel channel)
已过时。从接口复制的说明:ChannelInterceptor
Invoked immediately after a Message has been retrieved but before it is returned to the caller. The Message may be modified if necessary;null
aborts further interceptor invocations. This only applies to PollableChannels.- 指定者:
postReceive
在接口中ChannelInterceptor
afterReceiveCompletion
public void afterReceiveCompletion(@Nullable Message<?> message, MessageChannel channel, @Nullable Exception ex)
已过时。从接口复制的说明:ChannelInterceptor
Invoked after the completion of a receive regardless of any exception that have been raised thus allowing for proper resource cleanup.Note that this will be invoked only if
ChannelInterceptor.preReceive(org.springframework.messaging.MessageChannel)
successfully completed and returnedtrue
.- 指定者:
afterReceiveCompletion
在接口中ChannelInterceptor