クラス JpaOutboundGateway

実装済みのインターフェース一覧:
org.reactivestreams.Subscriber<Message<?>>, Aware, BeanClassLoaderAware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Ordered, ComponentSourceAware, ExpressionCapable, Orderable, MessageProducer, HeaderPropagationAware, IntegrationPattern, NamedComponent, IntegrationManagement, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>

public class JpaOutboundGateway extends AbstractReplyProducingMessageHandler
Jpa Outbound Gateway を使用すると、次のいずれかに送信操作を行うことができます。
  • JPA を使用してデータベースにデータを送信(挿入、削除)する
  • データベースからデータを取得(選択)する
選択した OutboundGatewayType に応じて、送信ゲートウェイは JpaExecutor のポーリング方式またはその executeOutboundJpaOperation 方式のいずれかを使用します。

アダプターを初期化するには、JpaExecutor をコンストラクターとして提供する必要があります。

導入:
2.2
作成者:
Gunnar Hillert, Amol Nayak, Artem Bilan, Gary Russell
  • コンストラクターの詳細

    • JpaOutboundGateway

      public JpaOutboundGateway(JpaExecutor jpaExecutor)
      すべての JPA 操作をラップする JpaExecutor を取得するコンストラクター。
      パラメーター:
      jpaExecutor - null であってはなりません
  • 方法の詳細

    • getComponentType

      public StringSE getComponentType()
      次で指定:
      インターフェース NamedComponent 内の getComponentType 
      オーバーライド:
      クラス MessageHandlerSupport の getComponentType 
    • handleRequestMessage

      protected @Nullable ObjectSE handleRequestMessage(Message<?> requestMessage)
      クラスからコピーされた説明: AbstractReplyProducingMessageHandler
      サブクラスはこのメソッドを実装して、リクエストメッセージを処理する必要があります。戻り値は、メッセージ、MessageBuilder、任意のプレーンオブジェクトです。基本クラスは、これらの開始点のいずれかからの返信メッセージの最終的な作成を処理します。戻り値が null の場合、メッセージフローはここで終了します。
      次で指定:
      クラス AbstractReplyProducingMessageHandler の handleRequestMessage 
      パラメーター:
      requestMessage - リクエストメッセージ。
      戻り値:
      メッセージを処理した結果、または null
    • setGatewayType

      public void setGatewayType(OutboundGatewayType gatewayType)
      JpaOutboundGateway モードを指定します。
      パラメーター:
      gatewayType - ゲートウェイ型。
    • setProducesReply

      public void setProducesReply(boolean producesReply)
      'false' に設定すると、このコンポーネントは送信チャネルアダプターとして機能します。明示的に設定しない場合、このプロパティはデフォルトで "true" になります。
      パラメーター:
      producesReply - デフォルトは "true" です。