クラス IntegrationFlowAdapter

java.lang.ObjectSE
org.springframework.integration.dsl.IntegrationFlowAdapter
実装されたすべてのインターフェース:
LifecyclePhasedSmartLifecycleIntegrationFlowManageableLifecycleManageableSmartLifecycle

public abstract class IntegrationFlowAdapter extends ObjectSE implements IntegrationFlow, ManageableSmartLifecycle
IntegrationFlow 抽象化の基本 Adapter クラス。from(java.lang.String) サポートメソッドの 1 つを使用して IntegrationFlowDefinition を生成するには、buildFlow() メソッドの実装が必要です。

通常、ターゲットサービスの実装に使用されます。

  @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"));
     }

 }
 
導入:
5.0
作成者:
Artem Bilan