クラス ParentContextCloserApplicationListener
java.lang.ObjectSE
org.springframework.boot.builder.ParentContextCloserApplicationListener
- 実装されたすべてのインターフェース:
EventListenerSE
、Aware
、ApplicationContextAware
、ApplicationListener<ParentContextApplicationContextInitializer.ParentContextAvailableEvent>
、Ordered
public class ParentContextCloserApplicationListener
extends ObjectSE
implements ApplicationListener<ParentContextApplicationContextInitializer.ParentContextAvailableEvent>, ApplicationContextAware, Ordered
親が閉じている場合にアプリケーションコンテキストを閉じるリスナー。リフレッシュイベントをリッスンし、そこから現在のコンテキストを取得して、クローズされたイベントをリッスンし、それを階層に伝搬します。
- 導入:
- 1.0.0
- 作成者:
- Dave Syer, Eric Bottard
ネストされたクラスのサマリー
ネストされたクラスフィールドサマリー
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターのサマリー
コンストラクターメソッドのサマリー
修飾子と型メソッド説明サブクラスはオーバーライドして、ContextCloserListener の独自のサブクラスを作成できます。int
getOrder()
void
void
setApplicationContext
(ApplicationContext context) クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.context.ApplicationListener から継承されたメソッド
supportsAsyncExecution
コンストラクターの詳細
ParentContextCloserApplicationListener
public ParentContextCloserApplicationListener()
メソッドの詳細
getOrder
public int getOrder()setApplicationContext
- 次で指定:
- インターフェース
ApplicationContextAware
のsetApplicationContext
- 例外:
BeansException
onApplicationEvent
public void onApplicationEvent(ParentContextApplicationContextInitializer.ParentContextAvailableEvent event) createContextCloserListener
protected ParentContextCloserApplicationListener.ContextCloserListener createContextCloserListener(ConfigurableApplicationContext child) サブクラスはオーバーライドして、ContextCloserListener の独自のサブクラスを作成できます。これは依然として弱い参照の使用を強制します。- パラメーター:
child
- 子コンテキスト- 戻り値:
- 使用する
ParentContextCloserApplicationListener.ContextCloserListener