public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanInfoAssembler implements BeanClassLoaderAware, InitializingBean
AbstractReflectiveMBeanInfoAssembler のサブクラス。これらのインターフェースで定義されているメソッドまたはプロパティは、MBean 操作および属性として公開されます。 デフォルトでは、このクラスは、Bean クラスによって実装されたインターフェースに基づいて、各操作または属性の包含に投票します。ただし、代わりに使用される managedInterfaces プロパティを介してインターフェースの配列を提供できます。複数の Bean があり、各 Bean で異なるインターフェースのセットを使用する場合は、Bean キー(Bean を MBeanExporter に渡すために使用される名前)を、interfaceMappings プロパティを使用してインターフェース名のリストにマッピングできます。
interfaceMappings と managedInterfaces の両方の値を指定すると、Spring は最初にマッピング内のインターフェースを見つけようとします。Bean のインターフェースが見つからない場合は、managedInterfaces で定義されたインターフェースを使用します。
setManagedInterfaces(java.lang.Class<?>...), setInterfaceMappings(java.util.Properties), MethodNameBasedMBeanInfoAssembler, SimpleReflectiveMBeanInfoAssembler, MBeanExporterATTRIBUTE_OPERATION_VISIBILITY, FIELD_CLASS, FIELD_CURRENCY_TIME_LIMIT, FIELD_DEFAULT, FIELD_DISPLAY_NAME, FIELD_GET_METHOD, FIELD_LOG, FIELD_LOG_FILE, FIELD_METRIC_CATEGORY, FIELD_METRIC_TYPE, FIELD_PERSIST_LOCATION, FIELD_PERSIST_NAME, FIELD_PERSIST_PERIOD, FIELD_PERSIST_POLICY, FIELD_ROLE, FIELD_SET_METHOD, FIELD_UNITS, FIELD_VISIBILITY, ROLE_GETTER, ROLE_OPERATION, ROLE_SETTER| コンストラクターと説明 |
|---|
InterfaceBasedMBeanInfoAssembler() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterPropertiesSet() 指定されたすべての Bean プロパティを設定した(そして BeanFactoryAware と ApplicationContextAware を満たした)後に BeanFactory によって呼び出されます。 |
protected boolean | includeOperation(MethodSE method, StringSE beanKey)Method が構成済みインターフェースの 1 つで宣言されているかどうか、およびそれがパブリックであるかどうかを確認します。 |
protected boolean | includeReadAttribute(MethodSE method, StringSE beanKey)Method が構成済みインターフェースの 1 つで宣言されているかどうか、およびそれがパブリックであるかどうかを確認します。 |
protected boolean | includeWriteAttribute(MethodSE method, StringSE beanKey)Method が構成済みインターフェースの 1 つで宣言されているかどうか、およびそれがパブリックであるかどうかを確認します。 |
void | setBeanClassLoader(ClassLoaderSE beanClassLoader)Bean class loaderSE を Bean インスタンスに提供するコールバック。 |
void | setInterfaceMappings(PropertiesSE mappings)Bean キーのマッピングを、インターフェース名のコンマ区切りリストに設定します。 |
void | setManagedInterfaces(ClassSE<?>... managedInterfaces) 管理情報の作成に使用するインターフェースの配列を設定します。 |
getNotificationInfo, setNotificationInfoMappings, setNotificationInfosapplyCurrencyTimeLimit, applyDefaultCurrencyTimeLimit, createModelMBeanOperationInfo, getAttributeDescription, getAttributeInfo, getClassForDescriptor, getDefaultCurrencyTimeLimit, getOperationDescription, getOperationInfo, getOperationParameters, getParameterNameDiscoverer, isExposeClassDescriptor, isUseStrictCasing, populateAttributeDescriptor, populateMBeanDescriptor, populateOperationDescriptor, setDefaultCurrencyTimeLimit, setExposeClassDescriptor, setParameterNameDiscoverer, setUseStrictCasingcheckManagedBean, getClassName, getClassToExpose, getClassToExpose, getConstructorInfo, getDescription, getMBeanInfo, getTargetClasscloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic void setManagedInterfaces(@Nullable ClassSE<?>... managedInterfaces)
interfaceMappings プロパティで Bean に対応するエントリが見つからない場合、これらのインターフェースは Bean に使用されます。managedInterfaces - 使用するインターフェースを示すクラスの配列。各エントリ はインターフェースでなければなりません。setInterfaceMappings(java.util.Properties)public void setInterfaceMappings(@Nullable PropertiesSE mappings)
プロパティキーは Bean キーと一致し、プロパティ値はインターフェース名のリストと一致する必要があります。Bean のインターフェースを検索する場合、Spring はこれらのマッピングを最初にチェックします。
mappings - Bean キーのインターフェース名へのマッピング public void setBeanClassLoader(@Nullable ClassLoaderSE beanClassLoader)
BeanClassLoaderAwareclass loaderSE を Bean インスタンスに提供するコールバック。 通常の Bean プロパティの設定後、ただし InitializingBean's InitializingBean.afterPropertiesSet() メソッドやカスタム init-method などの初期化コールバックの前に呼び出されます。
BeanClassLoaderAware の setBeanClassLoader beanClassLoader - 所有クラスローダー public void afterPropertiesSet()
InitializingBeanこのメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されている場合にのみ可能な初期化を実行し、設定ミスの場合に例外をスローできます。
InitializingBean の afterPropertiesSet protected boolean includeReadAttribute(MethodSE method, StringSE beanKey)
Method が構成済みインターフェースの 1 つで宣言されているかどうか、およびそれがパブリックであるかどうかを確認します。AbstractReflectiveMBeanInfoAssembler の includeReadAttribute method - アクセサー Method。beanKey - beans Map の MBean に関連付けられたキー。Method が構成済みインターフェースの 1 つで宣言されている場合は true、それ以外の場合は false。protected boolean includeWriteAttribute(MethodSE method, StringSE beanKey)
Method が構成済みインターフェースの 1 つで宣言されているかどうか、およびそれがパブリックであるかどうかを確認します。AbstractReflectiveMBeanInfoAssembler の includeWriteAttribute method - ミューテータ Method。beanKey - beans Map の MBean に関連付けられたキー。Method が構成済みインターフェースの 1 つで宣言されている場合は true、それ以外の場合は false。protected boolean includeOperation(MethodSE method, StringSE beanKey)
Method が構成済みインターフェースの 1 つで宣言されているかどうか、およびそれがパブリックであるかどうかを確認します。AbstractReflectiveMBeanInfoAssembler の includeOperation method - 操作 Method。beanKey - beans Map の MBean に関連付けられたキー。Method が構成済みインターフェースの 1 つで宣言されている場合は true、それ以外の場合は false。