Example usage for org.springframework.messaging.support ChannelInterceptor preReceive

List of usage examples for org.springframework.messaging.support ChannelInterceptor preReceive

Introduction

In this page you can find the example usage for org.springframework.messaging.support ChannelInterceptor preReceive.

Prototype

default boolean preReceive(MessageChannel channel) 

Source Link

Document

Invoked as soon as receive is called and before a Message is actually retrieved.

Usage

From source file:org.springframework.messaging.support.ChannelInterceptorChain.java

public boolean preReceive(MessageChannel channel) {
    if (logger.isTraceEnabled()) {
        logger.trace("preReceive on channel '" + channel + "'");
    }// w w  w.  jav  a  2s.  c om
    for (ChannelInterceptor interceptor : this.interceptors) {
        if (!interceptor.preReceive(channel)) {
            return false;
        }
    }
    return true;
}