Skip to content

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

Conversation

aartiguptaa
Copy link
Contributor

Provide an RSocketMessageHandlerCustomizer to allow customizing of the RSocketMessageHandler
#20303

@pivotal-issuemaster
Copy link

@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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 22, 2020
@pivotal-issuemaster
Copy link

@aartiguptaa Thank you for signing the Contributor License Agreement!

@mbhave
Copy link
Contributor

mbhave commented Apr 22, 2020

@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 RSocketMessageHandler. Tests for that would need to be added to this class. They would look similar to the tests that verify that other customizers have been applied. See this example.

@FunctionalInterface
public interface RSocketMessageHandlerCustomizer {

RSocketMessageHandler setRouteMatcher(RouteMatcher handler);
Copy link
Contributor

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)
Copy link
Contributor

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());
Copy link
Contributor

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.

@mbhave mbhave added the status: waiting-for-feedback We need additional information before we can continue label Apr 22, 2020
@wilkinsona wilkinsona added for: team-attention An issue we'd like other members of the team to review for: merge-with-amendments Needs some changes when we merge type: enhancement A general enhancement and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Apr 29, 2020
@wilkinsona wilkinsona added this to the 2.3.x milestone Apr 29, 2020
@wilkinsona wilkinsona changed the title R socket message handler customizer Provide an RSocketMessageHandlerCustomizer to allow customizing of the RSocketMessageHandler Apr 29, 2020
mbhave pushed a commit that referenced this pull request Apr 30, 2020
@mbhave mbhave closed this in d5246f1 Apr 30, 2020
@mbhave
Copy link
Contributor

mbhave commented Apr 30, 2020

@aartiguptaa Thank you for making your first contribution to Spring Boot. It has now been merged into master along with these amendments.

@mbhave mbhave modified the milestones: 2.3.x, 2.3.0.RC1 Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: merge-with-amendments Needs some changes when we merge type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants