クラス AbstractEndpoint
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
- 実装されているすべてのインターフェース:
Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、ApplicationContextAware、Lifecycle、Phased、SmartLifecycle、ComponentSourceAware、ExpressionCapable、NamedComponent、ManageableLifecycle、ManageableSmartLifecycle
- 既知の直属サブクラス
AbstractPollingEndpoint、EventDrivenConsumer、GatewayProxyFactoryBean、MessageProducerSupport、MessagingGatewaySupport、ReactiveStreamsConsumer
@IntegrationManagedResource
public abstract class AbstractEndpoint
extends IntegrationObjectSupport
implements ManageableSmartLifecycle, DisposableBean
メッセージエンドポイント実装の基本クラス。
このクラスはライフサイクルを実装し、autoStartup プロパティを提供します。true の場合、エンドポイントは初期化時に自動的に起動します。それ以外の場合は、start() メソッドを明示的に呼び出す必要があります。デフォルト値は true です。明示的な起動を要求するには、false の値を setAutoStartup(boolean) メソッドに指定します。
- 作成者:
- Mark Fisher, Kris Jacyna, Gary Russell, Artem Bilan, Trung Pham
フィールドのサマリー
フィールドクラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASEコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明voiddestroy()protected abstract voiddoStart()サブクラスは、開始動作でこのメソッドを実装する必要があります。protected abstract voiddoStop()サブクラスは、停止動作でこのメソッドを実装する必要があります。protected voiddoStop(RunnableSE callback) コンポーネントを停止し、コールバックを呼び出します。final intgetPhase()getRole()booleanisActive()final booleanfinal booleanprotected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidsetAutoStartup(boolean autoStartup) voidsetPhase(int phase) voidエンドポイントのロールを指定します。final voidstart()final voidstop()final voidstop(RunnableSE callback) クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getComponentType, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
フィールドの詳細
lifecycleLock
コンストラクターの詳細
AbstractEndpoint
public AbstractEndpoint()
メソッドの詳細
setAutoStartup
public void setAutoStartup(boolean autoStartup) setPhase
public void setPhase(int phase) setRole
エンドポイントのロールを指定します。このようなエンドポイントは、グループとして開始 / 停止できます。- パラメーター:
role- このエンドポイントのロール。- 導入:
- 5.0
- 関連事項:
getRole
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
IntegrationObjectSupportのonInit
destroy
public void destroy()- 次で指定:
- インターフェース
DisposableBeanのdestroy
isAutoStartup
public final boolean isAutoStartup()- 次で指定:
- インターフェース
SmartLifecycleのisAutoStartup
getPhase
public final int getPhase()- 次で指定:
- インターフェース
PhasedのgetPhase - 次で指定:
- インターフェース
SmartLifecycleのgetPhase
isRunning
public final boolean isRunning()- 次で指定:
- インターフェース
LifecycleのisRunning - 次で指定:
- インターフェース
ManageableLifecycleのisRunning
start
public final void start()- 次で指定:
- インターフェース
Lifecycleのstart - 次で指定:
- インターフェース
ManageableLifecycleのstart
stop
public final void stop()- 次で指定:
- インターフェース
Lifecycleのstop - 次で指定:
- インターフェース
ManageableLifecycleのstop
stop
- 次で指定:
- インターフェース
SmartLifecycleのstop
doStop
コンポーネントを停止し、コールバックを呼び出します。- パラメーター:
callback- 起動する Runnable。
isActive
public boolean isActive()doStart
protected abstract void doStart()サブクラスは、開始動作でこのメソッドを実装する必要があります。このメソッドは、lifecycleLockを保持しているときに呼び出されます。doStop
protected abstract void doStop()サブクラスは、停止動作でこのメソッドを実装する必要があります。このメソッドは、lifecycleLockを保持しているときに呼び出されます。