-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-3155: Add support for Java DSL extensions #3167
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
Please, take a look into this. Pay attention to the test class changes:
This is how your write your extension with any possible custom operators.
I'm not sure that we can come up with something much simpler. I intentionally made it as a separate Let me know WDYT? /CC @garyrussell |
Hi @artembilan, |
LGTM; nice! |
Thanks, Gary! Let's wait for feedback from @sirimamilla anyway! I see that some methods has to be moved to |
Agreed; I was just saying the approach looks good. |
Hi @artembilan, This working as expected for the composite EIP patterns where in we need to extend the existing patterns. This is what I wanted to be able to do.
I agree, This would be good enhancement, as we may think some option is required for application but that may not fit good for framework itself. those features can be added using this |
Overall I am amazed by the way @artembilan solved this complex problem with very simple and effective solution. |
I was able to use the composite eip pattern and able to solve the requirement of selector on Gateway.
|
Thanks, @sirimamilla , for feedback! So, stay tuned and I'll finish this PR today! I'm not sure that it will address all the possible extension peculiarities, but we can address them eventually (if needed) |
Fixes spring-projects#3155 Provide an `IntegrationFlowExtension` for possible custom EI-operators in the target project use-cases.
* Make all the `IntegrationComponentSpec` ctors as `protected` for possible custom extensions * Make some `BaseIntegrationFlowDefinition` methods and properties as `protected` to get them access from the `IntegrationFlowExtension` implementations * Document the feature
All docs fixed and rebased to Thanks, Gary! |
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.
HI @artembilan,
GatewayEndpointSpec(String requestChannel) can be made protected as well
GatewayEndpointSpec(String requestChannel) {
super(new GatewayMessageHandler());
this.handler.setRequestChannelName(requestChannel);
}
Good catch! Thank you! Anything else ? 😉 |
super(new GatewayMessageHandler()); please expose a constructor with this argument as protected. So extension classes will be able to extend the handler. |
I don't think so. That We talked about options to increase - the new component requires new contract and, therefore, new Spec. However with a new Please, elaborate more what is your goal to be able to extend that |
* Add JavaDocs to `GatewayEndpointSpec` methods
Hi @artembilan, Here is an example of the use of allowing GatewayMessageHandler be extended. This will act as Selecting Gateway. It will preserve all the gateway behaviors along with the additional filter capability.
Selecting Gateway can be used as below.
This will help in doing any further enhancements to the GatewayMessageHandler. |
Hi @artembilan, Protected actor can be added to below.
|
That's abusing a purpose of all the components we have out-of-the-box. It is not preserving, it is some hybrid I'd like to avoid. Sorry not accepting your request, but I'm fully against some hybrids when go beyond EIP catalog. The |
Even I agree with you, from EIP catalog this is an extension. I will implement this in my application. For this PR, I think we are almost ready to merge. No further comments from me. |
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.
Hi @artembilan ,
As reviewed, PR is performing the tasks as expected and can be merged. :)
So, @garyrussell , the final decision is up to you 😉 |
Fixes #3155
Provide an
IntegrationFlowExtension
for possible custom EI-operatorsin the target project use-cases.