-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-2749: Deprecate ChannelInterceptorAware #2751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
That's just cool to have that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues; one major, one minor.
@@ -243,7 +244,7 @@ public void setMessageConverter(MessageConverter messageConverter) { | |||
* Return a read-only list of the configured interceptors. | |||
*/ | |||
@Override | |||
public List<ChannelInterceptor> getChannelInterceptors() { | |||
public List<ChannelInterceptor> getInterceptors() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't do this; breaking change. Need to deprecate the old method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it clashes with the InterceptableChannel
API. So, we in chicken-or-egg situation anyway, independently of the version we are going to fix it. Good deal that this method is just protected
, so visible only for implementors, but not regular end-user code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved it to 5.1.4; let's talk when we have more time.
src/reference/asciidoc/channel.adoc
Outdated
@@ -304,6 +304,7 @@ Also, starting with version 5.1, `ChannelInterceptor.postReceive()` is no longer | |||
Previously, the method was called. | |||
If you have an interceptor that relies on the previous behavior, implement `afterReceiveCompleted()` instead, since that method is invoked, regardless of whether a message is received or not. | |||
|
|||
NOTE: Starting with version 5.1.3, the `ChannelInterceptorAware` is deprecated in favor of `InterceptableChannel` from Spring Messaging module, which it extends now for backward compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from the Spring Messaging module ... which it now extends
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/5.1.3/5.2/
from the Spring Messaging module
Fixes spring-projects#2749 The `org.springframework.messaging.support.InterceptableChannel` provides exact functionality as `ChannelInterceptorAware` * Make `ChannelInterceptorAware extends InterceptableChannel` * Suppress deprecation warning whenever we need to keep backward compatibility * Fix all other places to deal with `InterceptableChannel` already
Fixes spring-projects#2749 The `org.springframework.messaging.support.InterceptableChannel` provides exact functionality as `ChannelInterceptorAware` * Make `ChannelInterceptorAware extends InterceptableChannel` * Suppress deprecation warning whenever we need to keep backward compatibility * Fix all other places to deal with `InterceptableChannel` already
OK. I think its time to forget such a deprecation for I'll add a Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit picks
src/reference/asciidoc/channel.adoc
Outdated
@@ -304,6 +304,7 @@ Also, starting with version 5.1, `ChannelInterceptor.postReceive()` is no longer | |||
Previously, the method was called. | |||
If you have an interceptor that relies on the previous behavior, implement `afterReceiveCompleted()` instead, since that method is invoked, regardless of whether a message is received or not. | |||
|
|||
NOTE: Starting with version 5.1.3, the `ChannelInterceptorAware` is deprecated in favor of `InterceptableChannel` from Spring Messaging module, which it extends now for backward compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/5.1.3/5.2/
from the Spring Messaging module
Fixes #2749
The
org.springframework.messaging.support.InterceptableChannel
providesexact functionality as
ChannelInterceptorAware
ChannelInterceptorAware extends InterceptableChannel
compatibility
InterceptableChannel
already