Fix new classes and packages tangles (#3898)
* Fix new classes and packages tangles * Move `MessagingAnnotationPostProcessor` and `MethodAnnotationPostProcessor` impls out of the `config.annotation` package due to usage of the `FactoryBean` configs * Move `GenericHandler` and `GenericTransformer` to the `core` package to break a tangle with a `LambdaMessageProcessor` * Clean up affected tests and docs * * Fix Checkstyle violation for imports order
This commit is contained in:
@@ -50,7 +50,7 @@ The following changes have been made in version 5.1:
|
||||
The `IntegrationFlowContext` is now an interface and `IntegrationFlowRegistration` is an inner interface of `IntegrationFlowContext`.
|
||||
|
||||
A new `logAndReply()` operator has been introduced for convenience when you wish to log at the end of a flow for request-reply configurations.
|
||||
This avoid confusion with `log()` which is treated as a one-way end flow component.
|
||||
This avoids confusion with `log()` which is treated as a one-way end flow component.
|
||||
|
||||
A generated bean name for any `NamedComponent` within an integration flow is now based on the component type for better readability from visual tools, logs analyzers and metrics collectors.
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public IntegrationFlow integerFlow() {
|
||||
====
|
||||
|
||||
The `transform` method accepts a lambda as an endpoint argument to operate on the message payload.
|
||||
The real argument of this method is `GenericTransformer<S, T>`.
|
||||
The real argument of this method is a `GenericTransformer<S, T>` instance.
|
||||
Consequently, any of the provided transformers (`ObjectToJsonTransformer`, `FileToStringTransformer`, and other) can be used here.
|
||||
|
||||
Under the covers, `IntegrationFlowBuilder` recognizes the `MessageHandler` and the endpoint for it, with `MessageTransformingHandler` and `ConsumerEndpointFactoryBean`, respectively.
|
||||
@@ -1300,7 +1300,7 @@ With Java 8, you can even create an integration gateway with the `java.util.func
|
||||
@Bean
|
||||
public IntegrationFlow errorRecovererFlow() {
|
||||
return IntegrationFlow.from(Function.class, (gateway) -> gateway.beanName("errorRecovererFunction"))
|
||||
.handle((GenericHandler<?>) (p, h) -> {
|
||||
.<Object>handle((p, h) -> {
|
||||
throw new RuntimeException("intentional");
|
||||
}, e -> e.advice(retryAdvice()))
|
||||
.get();
|
||||
@@ -1432,4 +1432,4 @@ IntegrationFlow otherFlow() {
|
||||
|
||||
The composition in the middle of the flow is simply achievable with an existing `gateway(IntegrationFlow)` EIP-method.
|
||||
This way we can build flows with any complexity by composing them from simpler, reusable logical blocks.
|
||||
For example, you may add a library of `IntegrationFlow` beans as a dependency and it is just enough to have their configuration classes imported to the final project and autowired for your `IntegrationFlow` definitions.
|
||||
For example, you may add a library of `IntegrationFlow` beans as a dependency and it is just enough to have their configuration classes imported to the final project and autowired for your `IntegrationFlow` definitions.
|
||||
|
||||
@@ -433,7 +433,7 @@ public class EerhaApplication {
|
||||
|
||||
@Bean
|
||||
public IntegrationFlow advised() {
|
||||
return f -> f.handle((GenericHandler<String>) (payload, headers) -> {
|
||||
return f -> f.<String>handle((payload, headers) -> {
|
||||
if (payload.equals("good")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user