クラス AutomaticJobRegistrar

java.lang.ObjectSE
org.springframework.batch.core.configuration.support.AutomaticJobRegistrar
実装されたすべてのインターフェース:
org.springframework.beans.factory.Awareorg.springframework.beans.factory.InitializingBeanorg.springframework.context.ApplicationContextAwareorg.springframework.context.Lifecycleorg.springframework.context.Phasedorg.springframework.context.SmartLifecycleorg.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
  • コンストラクターの詳細

    • AutomaticJobRegistrar

      public AutomaticJobRegistrar()
  • メソッドの詳細

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      events が予想されるソースからのものかどうかを確認するために使用できる、囲んでいるアプリケーションコンテキスト。
      次で指定:
      インターフェース org.springframework.context.ApplicationContextAwaresetApplicationContext 
      パラメーター:
      applicationContext - 含まれているアプリケーションコンテキスト (存在する場合)
      関連事項:
      • ApplicationContextAware.setApplicationContext(ApplicationContext)
    • addApplicationContextFactory

      public void addApplicationContextFactory(ApplicationContextFactory applicationContextFactory)
      コンテキストとジョブのロードに使用されるセットに ApplicationContextFactory を 1 つ追加します。
      パラメーター:
      applicationContextFactory - 使用する ApplicationContextFactory
    • setApplicationContextFactories

      public void setApplicationContextFactories(ApplicationContextFactory[] applicationContextFactories)
      コンテキストとジョブのロードに使用されるセットに ApplicationContextFactory インスタンスの配列を追加します。
      パラメーター:
      applicationContextFactories - 使用する ApplicationContextFactory
    • setJobLoader

      public void setJobLoader(JobLoader jobLoader)
      ジョブのロードと管理に使用されるジョブローダー。
      パラメーター:
      jobLoader - 設定する JobLoader
    • getOrder

      public int getOrder()
      次で指定:
      インターフェース org.springframework.core.OrderedgetOrder 
    • setOrder

      public void setOrder(int order)
      起動およびシャットダウンする順序。
      パラメーター:
      order - 順序(デフォルト Ordered.LOWEST_PRECEDENCE)。
      関連事項:
      • Ordered
    • afterPropertiesSet

      public void afterPropertiesSet()
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
    • stop

      public void stop()
      JobLoader.clear() へのデリゲート。
      次で指定:
      インターフェース org.springframework.context.Lifecyclestop 
      関連事項:
      • Lifecycle.stop()
    • start

      public void start()
      提供されたファクトリからすべてのコンテキストを取得し、JobLoader に渡します。
      次で指定:
      インターフェース org.springframework.context.Lifecyclestart 
      関連事項:
      • Lifecycle.start()
    • isRunning

      public boolean isRunning()
      このコンポーネントが開始されているかどうかを確認します。
      次で指定:
      インターフェース org.springframework.context.LifecycleisRunning 
      戻り値:
      正常に開始され、停止されていない場合は true
      関連事項:
      • Lifecycle.isRunning()
    • isAutoStartup

      public boolean isAutoStartup()
      次で指定:
      インターフェース org.springframework.context.SmartLifecycleisAutoStartup 
    • setAutoStartup

      public void setAutoStartup(boolean autoStartup)
      パラメーター:
      autoStartup - 自動スタート用の true
      関連事項:
    • getPhase

      public int getPhase()
      次で指定:
      インターフェース org.springframework.context.PhasedgetPhase 
      次で指定:
      インターフェース org.springframework.context.SmartLifecyclegetPhase 
    • setPhase

      public void setPhase(int phase)
      パラメーター:
      phase - フェーズ。
      関連事項:
    • stop

      public void stop(RunnableSE callback)
      次で指定:
      インターフェース org.springframework.context.SmartLifecyclestop