クラス SourcePollingChannelAdapter
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.AbstractPollingEndpoint
org.springframework.integration.endpoint.SourcePollingChannelAdapter
- 実装されているすべてのインターフェース:
Aware、BeanClassLoaderAware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、ApplicationContextAware、Lifecycle、Phased、SmartLifecycle、ComponentSourceAware、ExpressionCapable、NamedComponent、IntegrationManagement、ManageableLifecycle、ManageableSmartLifecycle、TrackableComponent
public class SourcePollingChannelAdapter
extends AbstractPollingEndpoint
implements TrackableComponent, IntegrationManagement
MessageSource を MessageChannel に接続するためのチャネルアダプターの実装。- 作成者:
- Mark Fisher, Oleg Zhurakousky, Gary Russell, Artem Bilan, Christian Tzolov
ネストされたクラスの要約
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールドのサマリー
クラス org.springframework.integration.endpoint.AbstractPollingEndpoint から継承されたフィールド
DEFAULT_POLLING_PERIODクラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
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コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明protected voiddonePollingTask(@Nullable Message<?> message) 以前にmessageReceived(IntegrationResourceHolder, Message)から開始した観測を停止し (そのスコープを閉じます)。protected voiddoStart()サブクラスは、開始動作でこのメソッドを実装する必要があります。protected voiddoStop()サブクラスは、停止動作でこのメソッドを実装する必要があります。このエンドポイントのソースを返します。protected ObjectSEprotected StringSEリソースがIntegrationResourceHolderの属性として使用可能になるキーを返します。protected ObjectSEトランザクション同期を使用するときにバインドするリソース (MessageSource など) を返します。protected voidhandleMessage(Message<?> messageArg) メッセージを処理します。booleanこの実装がObservationRegistry.NOOPインスタンス以外のレジストリを処理する場合は true。protected booleanprotected voidmessageReceived(@Nullable IntegrationResourceHolder holder, Message<?> message) 受信したメッセージの観測を開始し、スコープを開きます。protected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。protected @Nullable Message<?> 次のメッセージを取得します(利用可能な場合)。voidregisterObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) ObservationRegistryを注入します。voidsetObservationConvention(@Nullable MessageReceiverObservationConvention observationConvention) voidsetOutputChannel(MessageChannel outputChannel) メッセージの送信先であるMessageChannelを指定します。voidsetOutputChannelName(StringSE outputChannelName) protected final voidsetReceiveMessageSource(ObjectSE source) voidsetSendTimeout(long sendTimeout) メッセージが出力チャネルに送信されるのを待機する最大時間を指定します。voidsetShouldTrack(boolean shouldTrack) このコンポーネントをメッセージ履歴で追跡するかどうかを指定します。voidsetSource(MessageSource<?> source) メッセージをポーリングするソースを指定します。クラス org.springframework.integration.endpoint.AbstractPollingEndpoint から継承されたメソッド
applyReceiveOnlyAdviceChain, getBeanClassLoader, getDefaultErrorChannel, getMaxMessagesPerPoll, getPollingFlux, getTaskExecutor, isReceiveOnlyAdvice, isSyncExecutor, setAdviceChain, setBeanClassLoader, setErrorHandler, setMaxMessagesPerPoll, setTaskExecutor, setTransactionSynchronizationFactory, setTriggerクラス 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, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, 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インターフェース org.springframework.context.SmartLifecycle から継承されたメソッド
isPauseable
コンストラクターの詳細
SourcePollingChannelAdapter
public SourcePollingChannelAdapter()
メソッドの詳細
setSource
setOutputChannel
メッセージの送信先であるMessageChannelを指定します。- パラメーター:
outputChannel- 出力チャネル。
getMessageSource
setOutputChannelName
setSendTimeout
public void setSendTimeout(long sendTimeout) メッセージが出力チャネルに送信されるのを待機する最大時間を指定します。- パラメーター:
sendTimeout- 送信タイムアウト。
setShouldTrack
public void setShouldTrack(boolean shouldTrack) このコンポーネントをメッセージ履歴で追跡するかどうかを指定します。- 次で指定:
- インターフェース
TrackableComponentのsetShouldTrack - パラメーター:
shouldTrack- コンポーネントを追跡する必要がある場合は true。
registerObservationRegistry
public void registerObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) インターフェースからコピーされた説明:IntegrationManagementObservationRegistryを注入します。指定された場合、MetricsCaptorは無視されます。メーターのキャプチャーは、提供されたObservationRegistryでObservationHandlerとして構成する必要があります。- 次で指定:
- インターフェース
IntegrationManagementのregisterObservationRegistry - パラメーター:
observationRegistry- コンポーネントからの観測結果を公開するObservationRegistry。- 関連事項:
setObservationConvention
public void setObservationConvention(@Nullable MessageReceiverObservationConvention observationConvention) IntegrationObservation.HANDLERにカスタムMessageReceiverObservationConventionを設定します。このコンポーネントに対してObservationRegistryが構成されていない場合は無視されます。- パラメーター:
observationConvention- 使用するMessageReceiverObservationConvention。- 導入:
- 6.5
isObserved
public boolean isObserved()インターフェースからコピーされた説明:IntegrationManagementこの実装がObservationRegistry.NOOPインスタンス以外のレジストリを処理する場合は true。- 次で指定:
- インターフェース
IntegrationManagementのisObserved - 戻り値:
- この実装が
ObservationRegistry.NOOPインスタンス以外のレジストリを処理する場合は true。
getComponentType
- 次で指定:
- インターフェース
NamedComponentのgetComponentType
isReactive
protected boolean isReactive()- オーバーライド:
- クラス
AbstractPollingEndpointのisReactive
getReceiveMessageSource
- オーバーライド:
- クラス
AbstractPollingEndpointのgetReceiveMessageSource
setReceiveMessageSource
- オーバーライド:
- クラス
AbstractPollingEndpointのsetReceiveMessageSource
doStart
protected void doStart()クラスからコピーされた説明:AbstractEndpointサブクラスは、開始動作でこのメソッドを実装する必要があります。このメソッドは、AbstractEndpoint.lifecycleLockを保持しているときに呼び出されます。- オーバーライド:
- クラス
AbstractPollingEndpointのdoStart
doStop
protected void doStop()クラスからコピーされた説明:AbstractEndpointサブクラスは、停止動作でこのメソッドを実装する必要があります。このメソッドは、AbstractEndpoint.lifecycleLockを保持しているときに呼び出されます。- オーバーライド:
- クラス
AbstractPollingEndpointのdoStop
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
AbstractPollingEndpointのonInit
getOutputChannel
handleMessage
クラスからコピーされた説明:AbstractPollingEndpointメッセージを処理します。- 次で指定:
- クラス
AbstractPollingEndpointのhandleMessage - パラメーター:
messageArg- メッセージ。
receiveMessage
クラスからコピーされた説明:AbstractPollingEndpoint次のメッセージを取得します(利用可能な場合)。すぐに利用できるメッセージがない場合は、null を返す場合があります。- 次で指定:
- クラス
AbstractPollingEndpointのreceiveMessage - 戻り値:
- メッセージまたは null。
messageReceived
受信したメッセージの観測を開始し、スコープを開きます。- オーバーライド:
- クラス
AbstractPollingEndpointのmessageReceived - パラメーター:
holder- このコンポーネントのリソースホルダー。message- 受信したメッセージ。
donePollingTask
以前にmessageReceived(IntegrationResourceHolder, Message)から開始した観測を停止し (そのスコープを閉じます)。- オーバーライド:
- クラス
AbstractPollingEndpointのdonePollingTask - パラメーター:
message- 受信メッセージ。nullにすることができますが、この実装では無視されます。
getResourceToBind
クラスからコピーされた説明:AbstractPollingEndpointトランザクション同期を使用するときにバインドするリソース (MessageSource など) を返します。- オーバーライド:
- クラス
AbstractPollingEndpointのgetResourceToBind - 戻り値:
- リソース。トランザクションの同期が不要な場合は null。
getResourceKey
クラスからコピーされた説明:AbstractPollingEndpointリソースがIntegrationResourceHolderの属性として使用可能になるキーを返します。デフォルトのExpressionEvaluatingTransactionSynchronizationProcessorは、この属性を SpEL 式の変数として使用できるようにします。- オーバーライド:
- クラス
AbstractPollingEndpointのgetResourceKey - 戻り値:
- キー。リソースを属性として使用できない場合は null (デフォルト)。