クラス AutomaticJobRegistrar
java.lang.ObjectSE
org.springframework.batch.core.configuration.support.AutomaticJobRegistrar
- 実装されたすべてのインターフェース:
org.springframework.beans.factory.Aware
、org.springframework.beans.factory.InitializingBean
、org.springframework.context.ApplicationContextAware
、org.springframework.context.Lifecycle
、org.springframework.context.Phased
、org.springframework.context.SmartLifecycle
、org.springframework.core.Ordered
public class AutomaticJobRegistrar
extends ObjectSE
implements org.springframework.core.Ordered, org.springframework.context.SmartLifecycle, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
アプリケーションコンテキストが作成および破棄されるときに、
Jobs
をロードおよびアンロードします。提供された各リソースは、現在のコンテキストを親とするアプリケーションコンテキストとしてロードされます。次に、子コンテキストのすべてのジョブが Bean 名で登録されます。JobRegistry
が必要です。- 導入:
- 2.1
- 作成者:
- Lucas Ward, Dave Syer, Mahmoud Ben Hassine
フィールドサマリー
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
インターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASE
コンストラクターのサマリー
メソッドのサマリー
修飾子と型メソッド説明void
addApplicationContextFactory
(ApplicationContextFactory applicationContextFactory) コンテキストとジョブのロードに使用されるセットにApplicationContextFactory
を 1 つ追加します。void
int
getOrder()
int
getPhase()
boolean
boolean
このコンポーネントが開始されているかどうかを確認します。void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) events
が予想されるソースからのものかどうかを確認するために使用できる、囲んでいるアプリケーションコンテキスト。void
setApplicationContextFactories
(ApplicationContextFactory[] applicationContextFactories) コンテキストとジョブのロードに使用されるセットにApplicationContextFactory
インスタンスの配列を追加します。void
setAutoStartup
(boolean autoStartup) void
setJobLoader
(JobLoader jobLoader) ジョブのロードと管理に使用されるジョブローダー。void
setOrder
(int order) 起動およびシャットダウンする順序。void
setPhase
(int phase) void
start()
提供されたファクトリからすべてのコンテキストを取得し、JobLoader
に渡します。void
stop()
JobLoader.clear()
へのデリゲート。void
stop
(RunnableSE callback)
コンストラクターの詳細
AutomaticJobRegistrar
public AutomaticJobRegistrar()
メソッドの詳細
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) events
が予想されるソースからのものかどうかを確認するために使用できる、囲んでいるアプリケーションコンテキスト。- 次で指定:
- インターフェース
org.springframework.context.ApplicationContextAware
のsetApplicationContext
- パラメーター:
applicationContext
- 含まれているアプリケーションコンテキスト (存在する場合)- 関連事項:
ApplicationContextAware.setApplicationContext(ApplicationContext)
addApplicationContextFactory
コンテキストとジョブのロードに使用されるセットにApplicationContextFactory
を 1 つ追加します。- パラメーター:
applicationContextFactory
- 使用するApplicationContextFactory
値
setApplicationContextFactories
コンテキストとジョブのロードに使用されるセットにApplicationContextFactory
インスタンスの配列を追加します。- パラメーター:
applicationContextFactories
- 使用するApplicationContextFactory
値
setJobLoader
ジョブのロードと管理に使用されるジョブローダー。- パラメーター:
jobLoader
- 設定するJobLoader
getOrder
public int getOrder()- 次で指定:
- インターフェース
org.springframework.core.Ordered
のgetOrder
setOrder
public void setOrder(int order) 起動およびシャットダウンする順序。- パラメーター:
order
- 順序(デフォルトOrdered.LOWEST_PRECEDENCE
)。- 関連事項:
Ordered
afterPropertiesSet
public void afterPropertiesSet()- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBean
のafterPropertiesSet
stop
public void stop()JobLoader.clear()
へのデリゲート。- 次で指定:
- インターフェース
org.springframework.context.Lifecycle
のstop
- 関連事項:
Lifecycle.stop()
start
public void start()提供されたファクトリからすべてのコンテキストを取得し、JobLoader
に渡します。- 次で指定:
- インターフェース
org.springframework.context.Lifecycle
のstart
- 関連事項:
Lifecycle.start()
isRunning
public boolean isRunning()このコンポーネントが開始されているかどうかを確認します。- 次で指定:
- インターフェース
org.springframework.context.Lifecycle
のisRunning
- 戻り値:
- 正常に開始され、停止されていない場合は
true
。 - 関連事項:
Lifecycle.isRunning()
isAutoStartup
public boolean isAutoStartup()- 次で指定:
- インターフェース
org.springframework.context.SmartLifecycle
のisAutoStartup
setAutoStartup
public void setAutoStartup(boolean autoStartup) - パラメーター:
autoStartup
- 自動スタート用のtrue
。- 関連事項:
getPhase
public int getPhase()- 次で指定:
- インターフェース
org.springframework.context.Phased
のgetPhase
- 次で指定:
- インターフェース
org.springframework.context.SmartLifecycle
のgetPhase
setPhase
public void setPhase(int phase) - パラメーター:
phase
- フェーズ。- 関連事項:
stop
- 次で指定:
- インターフェース
org.springframework.context.SmartLifecycle
のstop