public class SpringContextBootstrappingInitializer extends ObjectSE implements ApplicationListener<ApplicationContextEvent>, org.apache.geode.cache.Declarable
SpringContextBootstrappingInitializer クラスは、GemFire Server JVM ベースのプロセス内で Spring ApplicationContext をブートストラップするために使用される GemFire 構成初期化子です。これにより、GemFire Server リソースを Spring Data GemFire の構成メタデータでほぼ構成できます。GemFire Cache 自体は、Spring コンテキストで構成および初期化できない唯一のリソースです。これは、GemFire が GemFire Cache を作成して使用できるように初期化するまで初期化子が呼び出されないためです。PropertiesSE, Cache, Declarable, ApplicationContext, ApplicationListener, ConfigurableApplicationContext, AnnotationConfigApplicationContext, ApplicationContextEvent, ApplicationEventMulticaster, ClassPathXmlApplicationContext, DefaultResourceLoader| 修飾子と型 | フィールドと説明 |
|---|---|
static StringSE | BASE_PACKAGES_PARAMETER |
protected static StringSE | CHARS_TO_DELETE |
protected static StringSE | COMMA_DELIMITER |
static StringSE | CONTEXT_CONFIG_LOCATIONS_PARAMETER |
protected org.slf4j.Logger | logger |
| コンストラクターと説明 |
|---|
SpringContextBootstrappingInitializer() |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected ConfigurableApplicationContext | createApplicationContext(StringSE[] basePackages, StringSE[] configLocations) スキャンする @Configuration、@Component、JSR 330 アノテーション付きクラスを含む指定された基本パッケージ、またはコンテキスト構成メタデータファイルの指定された場所に基づいて、ConfigurableApplicationContext のインスタンスを作成 (構築および構成) します。 |
static void | destroy()SpringContextBootstrappingInitializer の状態を破棄します。 |
static ConfigurableApplicationContext | getApplicationContext()GemFire サーバーベースの JVM プロセス内で構築、構成、初期化された Spring ApplicationContext への参照を取得します。 |
void | init(org.apache.geode.cache.Cache cache, PropertiesSE parameters)cache.xml 内の Apache Geode または Pivotal GemFire <initializer> ブロックで指定されたパラメーターを使用して Spring ApplicationContext を初期化します。 |
void | init(PropertiesSE parameters) |
protected ConfigurableApplicationContext | initApplicationContext(ConfigurableApplicationContext applicationContext) この SpringContextBootstrappingInitializer を ApplicationListener として登録し、ランタイムシャットダウンフックを登録することにより、指定された ApplicationContext を初期化します。 |
protected org.slf4j.Logger | initLogger() この初期化子からの重要なメッセージをログに記録するために使用されるロガーの初期化メソッド。 |
protected static void | notifyOnExistingContextRefreshedEvent(ApplicationListener<ContextRefreshedEvent> listener)ContextRefreshedEvents に関係する ApplicationListeners が登録される前に ApplicationContext が作成、初期化、リフレッシュされていた場合、現在の既存の ContextRefreshedEvent を Spring、ApplicationListeners に通知します。これにより、構成 (オートワイヤー) を必要とする、遅れて登録されたアプリケーションコンポーネント (LazyWiringDeclarableSupport オブジェクトを継承する GemFire CacheLoaders など) も通知され、それに応じて接続されます。 |
void | onApplicationEvent(ApplicationContextEvent event)<initializer> ブロックが処理され、SpringContextBootstrappingInitializer 宣言可能コンポーネントが初期化されると、Spring ApplicationContext が GemFire によって作成およびリフレッシュされたときに通知されます。 |
protected ConfigurableApplicationContext | refreshApplicationContext(ConfigurableApplicationContext applicationContext) 指定された ApplicationContext をリフレッシュしてコンテキストをアクティブにします。 |
static boolean | register(ClassSE<?> annotatedClass) 指定された Spring アノテーション付き POJO クラスを登録します。このクラスは、Spring ApplicationContext を構成および初期化するために使用されます。 |
static <T extends ApplicationListener<ContextRefreshedEvent>> | register(T listener)GemFire の cache.xml ファイル内の <initializer> ブロック内で宣言された Declarables をインスタンス化して初期化するときに、GemFire によって Spring ApplicationContext が作成された場合に通知されるように、Spring ApplicationListener を登録します。 |
static void | setBeanClassLoader(ClassLoaderSE beanClassLoader)Bean 定義クラスを作成するときに、この GemFire イニシャライザーによって作成された Spring ApplicationContext で使用される ClassLoader を設定します。 |
static boolean | unregister(ClassSE<?> annotatedClass)Spring ApplicationContext を構成および初期化するために使用される、指定された Spring アノテーション付き POJO クラスを登録解除します。 |
static <T extends ApplicationListener<ContextRefreshedEvent>> | unregister(T listener)Spring コンテキストのリフレッシュ時に ApplicationEvents の受信を停止するために、この SpringContextBootstrappingInitializer から Spring ApplicationListener を登録解除します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEforPayloadpublic static final StringSE CONTEXT_CONFIG_LOCATIONS_PARAMETER
protected final org.slf4j.Logger logger
public static ConfigurableApplicationContext getApplicationContext()
ConfigurableApplicationContextpublic static void setBeanClassLoader(ClassLoaderSE beanClassLoader)
beanClassLoader - Spring ApplicationContext が Bean 定義クラスをロードするために使用する ClassLoader。IllegalStateExceptionSE - Spring ApplicationContext がすでに作成され初期化されている場合。ClassLoaderSEpublic static void destroy()
SpringContextBootstrappingInitializer の状態を破棄します。protected static void notifyOnExistingContextRefreshedEvent(ApplicationListener<ContextRefreshedEvent> listener)
listener - ApplicationContext がすでに作成、初期化、/ またはリフレッシュされた後に、ContextRefreshedEvents の通知を必要とする Spring、ApplicationListener。ApplicationListener.onApplicationEvent(org.springframework.context.ApplicationEvent), ContextRefreshedEventpublic static <T extends ApplicationListener<ContextRefreshedEvent>> T register(T listener)
T - Spring ApplicationListener のクラス型。listener - ApplicationListener は、この SpringContextBootstrappingInitializer によってマルチキャストされた ContextRefreshedEvents に登録されます。notifyOnExistingContextRefreshedEvent(org.springframework.context.ApplicationListener), unregister(org.springframework.context.ApplicationListener), ApplicationListener, ContextRefreshedEvent, #addApplicationListener(org.springframework.context.ApplicationListener)public static boolean register(ClassSE<?> annotatedClass)
annotatedClass - 登録する Spring アノテーション付き (@Configuration) POJO クラス。unregister(Class)public static <T extends ApplicationListener<ContextRefreshedEvent>> T unregister(T listener)
T - Spring ApplicationListener のクラス型。listener - この SpringContextBootstrappingInitializer によって、ApplicationListener は ContextRefreshedEvents の受信を登録解除します。register(org.springframework.context.ApplicationListener), ApplicationListener, ContextRefreshedEvent, #removeApplicationListener(org.springframework.context.ApplicationListener)public static boolean unregister(ClassSE<?> annotatedClass)
annotatedClass - Spring アノテーション付き (@Configuration) POJO クラスの登録を解除します。register(Class)protected org.slf4j.Logger initLogger()
LogFactory.getLog(Class), Logprotected ConfigurableApplicationContext createApplicationContext(StringSE[] basePackages, StringSE[] configLocations)
basePackages - アプリケーション @Components および @Configuration クラスをスキャンする基本パッケージ。configLocations - ClassPathXmlApplicationContext インスタンスを構成するために使用されるコンテキスト構成メタデータファイルの場所を示す文字列配列。IllegalArgumentExceptionSE - basePackages と configLocation の両方のパラメーター引数が null または空の場合。newApplicationContext(String[]), AnnotationConfigApplicationContext, AnnotationConfigApplicationContext.scan(String...), ClassPathXmlApplicationContextprotected ConfigurableApplicationContext initApplicationContext(ConfigurableApplicationContext applicationContext)
applicationContext - ConfigurableApplicationContext を初期化します。IllegalArgumentExceptionSE - ApplicationContext 参照が null の場合 !ConfigurableApplicationContext, ConfigurableApplicationContext.addApplicationListener(org.springframework.context.ApplicationListener), ConfigurableApplicationContext.registerShutdownHook()protected ConfigurableApplicationContext refreshApplicationContext(ConfigurableApplicationContext applicationContext)
applicationContext - ConfigurableApplicationContext をリフレッシュします。IllegalArgumentExceptionSE - ApplicationContext 参照が null の場合 !ConfigurableApplicationContext, ConfigurableApplicationContext.refresh()public void init(PropertiesSE parameters)
org.apache.geode.cache.Declarable 内の init public void init(org.apache.geode.cache.Cache cache,
PropertiesSE parameters)ApplicationContext を初期化します。parameters - 宣言された SpringContextBootstrappingInitializer Apache Geode/Pivotal GemFire Declarable オブジェクトの Apache Geode/Pivotal GemFire cache.xml <initializer> ブロックで定義された構成パラメーターと設定を含む PropertiesSE オブジェクト。cache - ピア Cache への参照。ApplicationContextException - Spring ApplicationContext を正常に構築、構成、初期化できなかった場合。createApplicationContext(String[], String[]), initApplicationContext(org.springframework.context.ConfigurableApplicationContext), refreshApplicationContext(org.springframework.context.ConfigurableApplicationContext), PropertiesSEpublic void onApplicationEvent(ApplicationContextEvent event)
ApplicationListener<ApplicationContextEvent> 内の onApplicationEvent event - ApplicationContextEvent は、Spring、ApplicationContext が GemFire によって作成およびリフレッシュされたか、JVM プロセスが終了したときに閉じられたことを通知します。ContextClosedEvent, ContextRefreshedEvent, #multicastEvent(org.springframework.context.ApplicationEvent)Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.