Class IntegrationFlowAdapter

java.lang.Object
org.springframework.integration.dsl.IntegrationFlowAdapter
All Implemented Interfaces:
Aware, BeanNameAware, Lifecycle, Phased, SmartLifecycle, ComponentSourceAware, IntegrationFlow, ManageableLifecycle, ManageableSmartLifecycle

public abstract class IntegrationFlowAdapter extends Object implements IntegrationFlow, ManageableSmartLifecycle, ComponentSourceAware
The base Adapter class for the IntegrationFlow abstraction. Requires the implementation for the buildFlow() method to produce IntegrationFlowDefinition using one of #from() support methods.

Typically, is used for target service implementation:

 @Component
 public class MyFlowAdapter extends IntegrationFlowAdapter {

    @Autowired
    private ConnectionFactory rabbitConnectionFactory;

    @Override
    protected IntegrationFlowDefinition<?> buildFlow() {
         return from(Amqp.inboundAdapter(this.rabbitConnectionFactory, "myQueue"))
                  .<String, String>transform(String::toLowerCase)
                  .channel(c -> c.queue("myFlowAdapterOutput"));
    }

}
Since:
5.0
Author:
Artem Bilan