クラス 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, ComponentSourceAware, ExpressionCapable, MessageProducer, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement, ManageableLifecycle, ManageableSmartLifecycle, TrackableComponent
- 既知の直属サブクラス
AbstractHazelcastMessageProducer, AbstractInternetProtocolReceivingChannelAdapter, AbstractMqttMessageDrivenChannelAdapter, AbstractXmppConnectionAwareEndpoint, AmqpClientMessageProducer, 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, Glenn Renfro
ネストされたクラスの概要
インターフェース IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールド概要
クラス AbstractEndpoint から継承されたフィールド
lifecycleLockクラス IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEインターフェース SmartLifecycle から継承されたフィールド
DEFAULT_PHASEコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明voidprotected final ErrorMessagebuildErrorMessage(@Nullable Message<?> message, ExceptionSE exception) 構成されたErrorMessageStrategyを使用して、例外とメッセージのエラーメッセージを作成します。protected voiddoStart()デフォルトでは何もしません。protected voiddoStop()デフォルトでは何もしません。@Nullable MessageChannelエラーメッセージがルーティングされるエラーチャネル(提供されている場合)を返します。protected AttributeAccessorgetErrorMessageAttributes(@Nullable Message<?> message) errorMessageStrategyでエラーメッセージを作成するときに使用するAttributeAccessorを設定します。protected ErrorMessageStrategy例外が発生したときにエラーメッセージを作成するために使用するErrorMessageStrategyを取得します。このコンポーネントが実装するパターン型を返します。protected MessagingTemplate@Nullable MessageChannel出力チャネルを返します。@Nullable StringSE出力チャンネル名を返します。protected MessageChannelbooleanこの実装がObservationRegistry.NOOPインスタンス以外のレジストリを処理する場合は true。protected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidregisterObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) ObservationRegistryを注入します。protected final booleansendErrorMessageIfNecessary(@Nullable Message<?> message, ExceptionSE exception) 例外とメッセージに基づいてエラーメッセージを送信します。protected voidsendMessage(@Nullable Message<?> message) voidsetErrorChannel(MessageChannel errorChannel) voidsetErrorChannelName(StringSE errorChannelName) エラーチャネル名を設定します。voidsetErrorMessageStrategy(ErrorMessageStrategy errorMessageStrategy) 例外が発生したときにエラーメッセージを作成するために使用するErrorMessageStrategyを設定します。voidsetObservationConvention(@Nullable MessageReceiverObservationConvention observationConvention) voidsetOutputChannel(MessageChannel outputChannel) 生成されたメッセージの送信先となるMessageChannelを指定します。voidsetOutputChannelName(StringSE outputChannelName) 出力チャネル名を設定します。提供されている場合、outputChannelをオーバーライドします。voidsetSendTimeout(long sendTimeout) 送信操作に使用するデフォルトのタイムアウト値を構成します。voidsetShouldTrack(boolean shouldTrack) protected voidsubscribeToPublisher(org.reactivestreams.Publisher<? extends Message<?>> publisher) クラス AbstractEndpoint から継承されたメソッド
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopクラス 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インターフェース IntegrationManagement から継承されたメソッド
destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedTypeインターフェース NamedComponent から継承されたメソッド
getBeanName, getComponentNameインターフェース SmartLifecycle から継承されたメソッド
isPauseable
コンストラクターの詳細
MessageProducerSupport
protected MessageProducerSupport()
方法の詳細
setOutputChannel
インターフェースからコピーされた説明:MessageProducer生成されたメッセージの送信先となるMessageChannelを指定します。- 次で指定:
- インターフェース
MessageProducer内のsetOutputChannel - パラメーター:
outputChannel- 出力チャネル。
setOutputChannelName
出力チャネル名を設定します。提供されている場合、outputChannelをオーバーライドします。- 次で指定:
- インターフェース
MessageProducer内のsetOutputChannelName - パラメーター:
outputChannelName- チャンネル名。- 導入:
- 4.3
getOutputChannelName
出力チャンネル名を返します。- 戻り値:
- 出力チャンネル名。指定しない場合は null。
- 導入:
- 6.5.10
getOutputChannel
インターフェースからコピーされた説明:MessageProducer出力チャネルを返します。- 次で指定:
- インターフェース
MessageProducer内のgetOutputChannel - 戻り値:
- チャンネル。
getComponentType
- 次で指定:
- インターフェース
NamedComponent内のgetComponentType
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です。- 戻り値:
- errorMessageStrategy
- 導入:
- 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) インターフェースからコピーされた説明:IntegrationManagementObservationRegistryを注入します。指定された場合、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
getRequiredOutputChannel