クラス MessageProducerSupport
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
- 実装されたすべてのインターフェース:
Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、SmartInitializingSingleton
、ApplicationContextAware
、Lifecycle
、Phased
、SmartLifecycle
、ExpressionCapable
、MessageProducer
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
、ManageableLifecycle
、ManageableSmartLifecycle
、TrackableComponent
- 既知の直属サブクラス
AbstractHazelcastMessageProducer
、AbstractInternetProtocolReceivingChannelAdapter
、AbstractMqttMessageDrivenChannelAdapter
、AbstractXmppConnectionAwareEndpoint
、AmqpInboundChannelAdapter
、DebeziumMessageProducer
、ExpressionMessageProducerSupport
、FileTailingMessageProducerSupport
、HazelcastClusterMonitorMessageProducer
、ImapIdleChannelAdapter
、JmsMessageDrivenEndpoint
、KafkaMessageDrivenChannelAdapter
、MongoDbChangeStreamMessageProducer
、NotificationListeningMessageProducer
、ReactiveMessageSourceProducer
、ReactiveRedisStreamMessageProducer
、RedisInboundChannelAdapter
、RedisQueueMessageDrivenEndpoint
、StompInboundChannelAdapter
、SyslogReceivingChannelAdapterSupport
、TcpReceivingChannelAdapter
、WebSocketInboundChannelAdapter
、ZeroMqMessageProducer
public abstract class MessageProducerSupport
extends AbstractEndpoint
implements MessageProducer, TrackableComponent, SmartInitializingSingleton, IntegrationPattern, IntegrationInboundManagement
出力チャネルに setter を提供し、メッセージを送信するための便利なメソッドを提供するプロデューサーエンドポイントのサポートクラス。
- 作成者:
- Mark Fisher, Artem Bilan, Gary Russell
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドサマリー
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
lifecycleCondition, lifecycleLock
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
インターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASE
コンストラクターのサマリー
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
protected final ErrorMessage
buildErrorMessage
(Message<?> message, ExceptionSE exception) 構成されたErrorMessageStrategy
を使用して、例外とメッセージのエラーメッセージを作成します。protected void
doStart()
デフォルトでは何もしません。protected void
doStop()
デフォルトでは何もしません。エラーメッセージがルーティングされるエラーチャネル(提供されている場合)を返します。protected AttributeAccessor
getErrorMessageAttributes
(Message<?> message) errorMessageStrategy
でエラーメッセージを作成するときに使用するAttributeAccessor
を設定します。protected ErrorMessageStrategy
例外が発生したときにエラーメッセージを作成するために使用するErrorMessageStrategy
を取得します。このコンポーネントが実装するパターン型を返します。protected MessagingTemplate
出力チャネルを返します。boolean
この実装がObservationRegistry.NOOP
インスタンス以外のレジストリを処理する場合は true。protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。void
registerObservationRegistry
(io.micrometer.observation.ObservationRegistry observationRegistry) ObservationRegistry
を注入します。protected final boolean
sendErrorMessageIfNecessary
(Message<?> message, ExceptionSE exception) 例外とメッセージに基づいてエラーメッセージを送信します。protected void
sendMessage
(Message<?> message) void
setErrorChannel
(MessageChannel errorChannel) void
setErrorChannelName
(StringSE errorChannelName) エラーチャネル名を設定します。final void
setErrorMessageStrategy
(ErrorMessageStrategy errorMessageStrategy) 例外が発生したときにエラーメッセージを作成するために使用するErrorMessageStrategy
を設定します。void
setObservationConvention
(MessageReceiverObservationConvention observationConvention) void
setOutputChannel
(MessageChannel outputChannel) 生成されたメッセージの送信先となるMessageChannel
を指定します。void
setOutputChannelName
(StringSE outputChannelName) 出力チャネル名を設定します。提供されている場合、outputChannel
をオーバーライドします。void
setSendTimeout
(long sendTimeout) 送信操作に使用するデフォルトのタイムアウト値を構成します。void
setShouldTrack
(boolean shouldTrack) protected void
subscribeToPublisher
(org.reactivestreams.Publisher<? extends Message<?>> publisher) クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたメソッド
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedType
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName, getComponentType
コンストラクターの詳細
MessageProducerSupport
protected MessageProducerSupport()
メソッドの詳細
setOutputChannel
インターフェースからコピーされた説明:MessageProducer
生成されたメッセージの送信先となるMessageChannel
を指定します。- 次で指定:
- インターフェース
MessageProducer
のsetOutputChannel
- パラメーター:
outputChannel
- 出力チャネル。
setOutputChannelName
出力チャネル名を設定します。提供されている場合、outputChannel
をオーバーライドします。- 次で指定:
- インターフェース
MessageProducer
のsetOutputChannelName
- パラメーター:
outputChannelName
- チャンネル名。- 導入:
- 4.3
getOutputChannel
インターフェースからコピーされた説明:MessageProducer
出力チャネルを返します。- 次で指定:
- インターフェース
MessageProducer
のgetOutputChannel
- 戻り値:
- チャンネル。
setErrorChannel
setErrorChannelName
エラーチャネル名を設定します。エラーチャネルが提供されていない場合、このエンドポイントは例外をメッセージ駆動型ソースに伝播します。例外を完全に抑制するには、ここで "nullChannel" への参照を提供します。- パラメーター:
errorChannelName
- エラーチャネル Bean 名。- 導入:
- 4.3
getErrorChannel
エラーメッセージがルーティングされるエラーチャネル(提供されている場合)を返します。- 戻り値:
- チャネルまたは null。
- 導入:
- 4.3
setSendTimeout
public void setSendTimeout(long sendTimeout) 送信操作に使用するデフォルトのタイムアウト値を構成します。個々のメッセージに対してオーバーライドされる場合があります。- パラメーター:
sendTimeout
- 「送信」操作のタイムアウト (ミリ秒)- 関連事項:
setShouldTrack
public void setShouldTrack(boolean shouldTrack) - 次で指定:
- インターフェース
TrackableComponent
のsetShouldTrack
setErrorMessageStrategy
例外が発生したときにエラーメッセージを作成するために使用するErrorMessageStrategy
を設定します。デフォルトはDefaultErrorMessageStrategy
です。- パラメーター:
errorMessageStrategy
-ErrorMessageStrategy
- 導入:
- 4.3.10
getErrorMessageStrategy
例外が発生したときにエラーメッセージを作成するために使用するErrorMessageStrategy
を取得します。デフォルトはDefaultErrorMessageStrategy
です。- 戻り値:
- エラーメッセージ戦略
- 導入:
- 6.0
getMessagingTemplate
setObservationConvention
public void setObservationConvention(@Nullable MessageReceiverObservationConvention observationConvention) IntegrationObservation.HANDLER
にカスタムMessageReceiverObservationConvention
を設定します。このコンポーネントに対してObservationRegistry
が構成されていない場合は無視されます。- パラメーター:
observationConvention
- 使用するMessageReceiverObservationConvention
。- 導入:
- 6.0
registerObservationRegistry
public void registerObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) インターフェースからコピーされた説明:IntegrationManagement
ObservationRegistry
を注入します。指定された場合、MetricsCaptor
は無視されます。メーターのキャプチャーは、提供されたObservationRegistry
でObservationHandler
として構成する必要があります。- 次で指定:
- インターフェース
IntegrationManagement
のregisterObservationRegistry
- パラメーター:
observationRegistry
- コンポーネントからの観察結果を公開するObservationRegistry
。- 関連事項:
isObserved
public boolean isObserved()インターフェースからコピーされた説明:IntegrationManagement
この実装がObservationRegistry.NOOP
インスタンス以外のレジストリを処理する場合は true。- 次で指定:
- インターフェース
IntegrationManagement
のisObserved
- 戻り値:
- この実装が
ObservationRegistry.NOOP
インスタンス以外のレジストリを処理する場合は true。
getIntegrationPatternType
インターフェースからコピーされた説明:IntegrationPattern
このコンポーネントが実装するパターン型を返します。- 次で指定:
- インターフェース
IntegrationPattern
のgetIntegrationPatternType
- 戻り値:
- このコンポーネントが実装する
IntegrationPatternType
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- 次で指定:
- インターフェース
SmartInitializingSingleton
のafterSingletonsInstantiated
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupport
サブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
AbstractEndpoint
のonInit
doStart
protected void doStart()デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。"lifecycleLock" によって保護されています。- 次で指定:
- クラス
AbstractEndpoint
のdoStart
doStop
protected void doStop()デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。- 次で指定:
- クラス
AbstractEndpoint
のdoStop
sendMessage
subscribeToPublisher
sendErrorMessageIfNecessary
protected final boolean sendErrorMessageIfNecessary(@Nullable Message<?> message, ExceptionSE exception) 例外とメッセージに基づいてエラーメッセージを送信します。- パラメーター:
message
- メッセージ。exception
- 例外。- 戻り値:
- エラーチャネルが利用可能で、メッセージが送信された場合は true。
- 導入:
- 4.3.10
buildErrorMessage
構成されたErrorMessageStrategy
を使用して、例外とメッセージのエラーメッセージを作成します。- パラメーター:
message
- メッセージ。exception
- 例外。- 戻り値:
- エラーメッセージ。
- 導入:
- 4.3.10
getErrorMessageAttributes
errorMessageStrategy
でエラーメッセージを作成するときに使用するAttributeAccessor
を設定します。- パラメーター:
message
- メッセージ。- 戻り値:
- 属性。
- 導入:
- 4.3.10