接口 ChannelInterceptor

    • 方法详细资料

      • preSend

        Message<?> preSend​(Message<?> message,
                           MessageChannel channel)
        Invoked before the Message is actually sent to the channel. This allows for modification of the Message if necessary. If this method returns null then the actual send invocation will not occur.
      • postSend

        void postSend​(Message<?> message,
                      MessageChannel channel,
                      boolean sent)
        Invoked immediately after the send invocation. The boolean value argument represents the return value of that invocation.
      • preReceive

        boolean preReceive​(MessageChannel channel)
        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.
      • postReceive

        Message<?> postReceive​(Message<?> message,
                               MessageChannel channel)
        Invoked immediately after a Message has been retrieved but before it is returned to the caller. The Message may be modified if necessary. This only applies to PollableChannels.