クラス JpaOutboundGateway
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractMessageProducingHandler
org.springframework.integration.handler.AbstractReplyProducingMessageHandler
org.springframework.integration.jpa.outbound.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<?>>
Jpa Outbound Gateway を使用すると、次のいずれかに送信操作を行うことができます。
- JPA を使用してデータベースにデータを送信(挿入、削除)する
- データベースからデータを取得(選択)する
OutboundGatewayType に応じて、送信ゲートウェイは JpaExecutor のポーリング方式またはその executeOutboundJpaOperation 方式のいずれかを使用します。 アダプターを初期化するには、JpaExecutor をコンストラクターとして提供する必要があります。
- 導入:
- 2.2
- 作成者:
- Gunnar Hillert, Amol Nayak, Artem Bilan, Gary Russell
ネストされたクラスの概要
クラス AbstractReplyProducingMessageHandler から継承されたネストクラス / インターフェース
AbstractReplyProducingMessageHandler.RequestHandlerインターフェース IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールド概要
クラス AbstractMessageProducingHandler から継承されたフィールド
messagingTemplateクラス IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEインターフェース Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEコンストラクター概要
コンストラクターコンストラクター説明JpaOutboundGateway(JpaExecutor jpaExecutor) すべての JPA 操作をラップするJpaExecutorを取得するコンストラクター。方法の概要
修飾子と型メソッド説明protected @Nullable ObjectSEhandleRequestMessage(Message<?> requestMessage) サブクラスはこのメソッドを実装して、リクエストメッセージを処理する必要があります。voidsetGatewayType(OutboundGatewayType gatewayType) JpaOutboundGatewayモードを指定します。voidsetProducesReply(boolean producesReply) 'false' に設定すると、このコンポーネントは送信チャネルアダプターとして機能します。クラス AbstractReplyProducingMessageHandler から継承されたメソッド
doInit, doInvokeAdvisedRequestHandler, getBeanClassLoader, getIntegrationPatternType, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyクラス AbstractMessageProducingHandler から継承されたメソッド
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, setupMessageProcessor, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeadersクラス AbstractMessageHandler から継承されたメソッド
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionクラス MessageHandlerSupport から継承されたメソッド
buildSendTimer, destroy, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackクラス IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringクラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース reactor.core.CoreSubscriber から継承されたメソッド
currentContextインターフェース IntegrationManagement から継承されたメソッド
getThisAsインターフェース NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
JpaOutboundGateway
すべての JPA 操作をラップするJpaExecutorを取得するコンストラクター。- パラメーター:
jpaExecutor- null であってはなりません
方法の詳細
getComponentType
- 次で指定:
- インターフェース
NamedComponent内のgetComponentType - オーバーライド:
- クラス
MessageHandlerSupportのgetComponentType
handleRequestMessage
クラスからコピーされた説明:AbstractReplyProducingMessageHandlerサブクラスはこのメソッドを実装して、リクエストメッセージを処理する必要があります。戻り値は、メッセージ、MessageBuilder、任意のプレーンオブジェクトです。基本クラスは、これらの開始点のいずれかからの返信メッセージの最終的な作成を処理します。戻り値が null の場合、メッセージフローはここで終了します。- 次で指定:
- クラス
AbstractReplyProducingMessageHandlerのhandleRequestMessage - パラメーター:
requestMessage- リクエストメッセージ。- 戻り値:
- メッセージを処理した結果、または
null
setGatewayType
JpaOutboundGatewayモードを指定します。- パラメーター:
gatewayType- ゲートウェイ型。
setProducesReply
public void setProducesReply(boolean producesReply) 'false' に設定すると、このコンポーネントは送信チャネルアダプターとして機能します。明示的に設定しない場合、このプロパティはデフォルトで "true" になります。- パラメーター:
producesReply- デフォルトは "true" です。