Class IntegrationFlowAdapter

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

public abstract class IntegrationFlowAdapter extends Object implements IntegrationFlow, ManageableSmartLifecycle
The base Adapter class for the IntegrationFlow abstraction. Requires the implementation for the buildFlow() method to produce IntegrationFlowDefinition using one of from(java.lang.String) 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