org.springframework.messaging.support

## Class ChannelInterceptorAdapter

- java.lang.Object
- - org.springframework.messaging.support.ChannelInterceptorAdapter

All Implemented Interfaces:
  ChannelInterceptor

Deprecated.
as of 5.0.7 `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

A `ChannelInterceptor` base class with empty method implementations as a convenience.

Since:
  4.0
Author:
  Mark Fisher, Rossen Stoyanchev

### Constructor Summary

Constructors
Constructor and Description
`ChannelInterceptorAdapter()` Deprecated.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ChannelInterceptorAdapter

    public ChannelInterceptorAdapter()

Deprecated.

### Method Detail

#### preSend

    public Message<?> preSend(Message<?> message,
                              MessageChannel channel)

Deprecated.
Description copied from interface: `ChannelInterceptor`
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.

Specified by:
  `preSend` in interface `ChannelInterceptor`

#### postSend

    public void postSend(Message<?> message,
                         MessageChannel channel,
                         boolean sent)

Deprecated.
Description copied from interface: `ChannelInterceptor`
Invoked immediately after the send invocation. The boolean value argument represents the return value of that invocation.

Specified by:
  `postSend` in interface `ChannelInterceptor`

#### afterSendCompletion

    public void afterSendCompletion(Message<?> message,
                                    MessageChannel channel,
                                    boolean sent,
                                    @Nullable
                                    Exception ex)

Deprecated.
Description copied from interface: `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 return `null`.

Specified by:
  `afterSendCompletion` in interface `ChannelInterceptor`

#### preReceive

    public boolean preReceive(MessageChannel channel)

Deprecated.
Description copied from interface: `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.

Specified by:
  `preReceive` in interface `ChannelInterceptor`

#### postReceive

    public Message<?> postReceive(Message<?> message,
                                  MessageChannel channel)

Deprecated.
Description copied from interface: `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.

Specified by:
  `postReceive` in interface `ChannelInterceptor`

#### afterReceiveCompletion

    public void afterReceiveCompletion(@Nullable
                                       Message<?> message,
                                       MessageChannel channel,
                                       @Nullable
                                       Exception ex)

Deprecated.
Description copied from interface: `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 returned `true`.

Specified by:
  `afterReceiveCompletion` in interface `ChannelInterceptor`