-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Provide an RSocketMessageHandlerCustomizer to allow customizing of the RSocketMessageHandler #21081
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
Provide an RSocketMessageHandlerCustomizer to allow customizing of the RSocketMessageHandler #21081
Conversation
@aartiguptaa Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@aartiguptaa Thank you for signing the Contributor License Agreement! |
@aartiguptaa Thanks for the pull request. I've left a few comments on it. In addition to those, the pull request is missing tests to verify that the customizers are being applied to the |
@FunctionalInterface | ||
public interface RSocketMessageHandlerCustomizer { | ||
|
||
RSocketMessageHandler setRouteMatcher(RouteMatcher handler); |
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.
To be consistent with other customizers, the method shouldn't return anything but be void
instead.
@@ -36,17 +40,19 @@ | |||
* @author Brian Clozel | |||
* @since 2.2.0 | |||
*/ | |||
@Configuration(proxyBeanMethods = false) | |||
@ConditionalOnClass({ RSocketRequester.class, RSocketFactory.class, TcpServerTransport.class }) | |||
@Configuration(proxyBeanMethods = true) |
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.
Is there a reason this was change to true
?
@ConditionalOnMissingBean(RSocketMessageHandler.class) | ||
public RSocketMessageHandler messageHandler(RSocketStrategies rSocketStrategies, ObjectProvider<RSocketMessageHandlerCustomizer> customizers) { | ||
RSocketMessageHandlerCustomizer rSocketMessageHandlerCustomizer = customizers.getIfAvailable(); | ||
return rSocketMessageHandlerCustomizer.setRouteMatcher(rSocketStrategies.routeMatcher()); |
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.
It looks like messageHandler.setRSocketStrategies(rSocketStrategies)
got removed as part of this change. We still want to do that and apply the customizers after that.
@aartiguptaa Thank you for making your first contribution to Spring Boot. It has now been merged into master along with these amendments. |
Provide an RSocketMessageHandlerCustomizer to allow customizing of the RSocketMessageHandler
#20303