public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssembler implements AutodetectCapableMBeanInfoAssembler, InitializingBean
MBeanInfoAssembler
インターフェースの実装。JmxAttributeSource
戦略インターフェースを使用するため、サポートされている実装を使用してメタデータを読み取ることができます。すぐに使える Spring は、アノテーションに基づく実装 AnnotationJmxAttributeSource
を提供します。
setAttributeSource(org.springframework.jmx.export.metadata.JmxAttributeSource)
, AnnotationJmxAttributeSource
ATTRIBUTE_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
コンストラクターと説明 |
---|
MetadataMBeanInfoAssembler() setAttributeSource(org.springframework.jmx.export.metadata.JmxAttributeSource) メソッドを介して構成する必要がある新しい MetadataMBeanInfoAssembler を作成します。 |
MetadataMBeanInfoAssembler(JmxAttributeSource attributeSource) 指定された JmxAttributeSource の新しい MetadataMBeanInfoAssembler を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() |
protected void | checkManagedBean(ObjectSE managedBean) JDK 動的プロキシが検出された場合、IllegalArgumentException をスローします。 |
protected StringSE | getAttributeDescription(PropertyDescriptorSE propertyDescriptor, StringSE beanKey) このプロパティ記述子に対応する属性の説明を作成します。 |
protected StringSE | getDescription(ObjectSE managedBean, StringSE beanKey) ソースレベルのメタデータから管理対象リソースの説明を読み取ります。 |
protected ModelMBeanNotificationInfoSE[] | getNotificationInfo(ObjectSE managedBean, StringSE beanKey) |
protected StringSE | getOperationDescription(MethodSE method, StringSE beanKey) メタデータから、指定された Method の説明を取得します。 |
protected MBeanParameterInfoSE[] | getOperationParameters(MethodSE method, StringSE beanKey) メソッドにアタッチされた ManagedOperationParameter 属性から MBeanParameterInfo を読み取ります。 |
boolean | includeBean(ClassSE<?> beanClass, StringSE beanName) Bean の自動検出に使用されます。 |
protected boolean | includeOperation(MethodSE method, StringSE beanKey) オペレーションの包含に関する投票。 |
protected boolean | includeReadAttribute(MethodSE method, StringSE beanKey) 属性アクセサーを含めることに投票します。 |
protected boolean | includeWriteAttribute(MethodSE method, StringSE beanKey) 属性ミューテーターの包含に関する投票。 |
protected void | populateAttributeDescriptor(DescriptorSE desc, MethodSE getter, MethodSE setter, StringSE beanKey) ManagedAttribute 属性または ManagedMetric 属性の記述子フィールドを属性記述子に追加します。 |
protected void | populateMBeanDescriptor(DescriptorSE desc, ObjectSE managedBean, StringSE beanKey) ManagedResource 属性の記述子フィールドを MBean 記述子に追加します。 |
protected void | populateOperationDescriptor(DescriptorSE desc, MethodSE method, StringSE beanKey) ManagedAttribute 属性から属性記述子に記述子フィールドを追加します。 |
void | setAttributeSource(JmxAttributeSource attributeSource) Bean クラスからメタデータを読み取るために使用する JmxAttributeSource 実装を設定します。 |
applyCurrencyTimeLimit, applyDefaultCurrencyTimeLimit, createModelMBeanOperationInfo, getAttributeInfo, getClassForDescriptor, getDefaultCurrencyTimeLimit, getOperationInfo, getParameterNameDiscoverer, isExposeClassDescriptor, isUseStrictCasing, setDefaultCurrencyTimeLimit, setExposeClassDescriptor, setParameterNameDiscoverer, setUseStrictCasing
getClassName, getClassToExpose, getClassToExpose, getConstructorInfo, getMBeanInfo, getTargetClass
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
getMBeanInfo
public MetadataMBeanInfoAssembler()
setAttributeSource(org.springframework.jmx.export.metadata.JmxAttributeSource)
メソッドを介して構成する必要がある新しい MetadataMBeanInfoAssembler
を作成します。public MetadataMBeanInfoAssembler(JmxAttributeSource attributeSource)
JmxAttributeSource
の新しい MetadataMBeanInfoAssembler
を作成します。attributeSource
- 使用する JmxAttributeSourcepublic void setAttributeSource(JmxAttributeSource attributeSource)
JmxAttributeSource
実装を設定します。public void afterPropertiesSet()
InitializingBean
BeanFactoryAware
、ApplicationContextAware
などを満たした後、包含 BeanFactory
によって呼び出されます。このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。
InitializingBean
の afterPropertiesSet
protected void checkManagedBean(ObjectSE managedBean) throws IllegalArgumentExceptionSE
AbstractMBeanInfoAssembler
の checkManagedBean
managedBean
- 公開される Bean (AOP プロキシである可能性があります)IllegalArgumentExceptionSE
- Bean は露出には無効です public boolean includeBean(ClassSE<?> beanClass, StringSE beanName)
ManagedResource
属性があるかどうかを確認します。含まれている場合は、含まれている Bean のリストを追加します。AutodetectCapableMBeanInfoAssembler
の includeBean
beanClass
- Bean のクラス beanName
- Bean ファクトリ内の Bean の名前 protected boolean includeReadAttribute(MethodSE method, StringSE beanKey)
AbstractReflectiveMBeanInfoAssembler
の includeReadAttribute
method
- アクセサーメソッド beanKey
- Beans マップで MBean に関連付けられているキー protected boolean includeWriteAttribute(MethodSE method, StringSE beanKey)
AbstractReflectiveMBeanInfoAssembler
の includeWriteAttribute
method
- ミューテーターメソッド beanKey
- Beans マップで MBean に関連付けられているキー protected boolean includeOperation(MethodSE method, StringSE beanKey)
AbstractReflectiveMBeanInfoAssembler
の includeOperation
method
- 操作方法 beanKey
- Beans マップで MBean に関連付けられているキー protected StringSE getDescription(ObjectSE managedBean, StringSE beanKey)
String
を返します。AbstractMBeanInfoAssembler
の getDescription
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー protected StringSE getAttributeDescription(PropertyDescriptorSE propertyDescriptor, StringSE beanKey)
AbstractReflectiveMBeanInfoAssembler
の getAttributeDescription
propertyDescriptor
- 属性の PropertyDescriptorbeanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー protected StringSE getOperationDescription(MethodSE method, StringSE beanKey)
Method
の説明を取得します。メタデータに説明が存在しないメソッド名を使用します。AbstractReflectiveMBeanInfoAssembler
の getOperationDescription
method
- 操作方法 beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー protected MBeanParameterInfoSE[] getOperationParameters(MethodSE method, StringSE beanKey)
ManagedOperationParameter
属性から MBeanParameterInfo
を読み取ります。属性が見つからない場合、MBeanParameterInfo
の空の配列を返します。AbstractReflectiveMBeanInfoAssembler
の getOperationParameters
method
- パラメーター情報を取得する Method
beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー MBeanParameterInfo
配列 protected ModelMBeanNotificationInfoSE[] getNotificationInfo(ObjectSE managedBean, StringSE beanKey)
AbstractMBeanInfoAssembler
の getNotificationInfo
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー protected void populateMBeanDescriptor(DescriptorSE desc, ObjectSE managedBean, StringSE beanKey)
ManagedResource
属性から MBean 記述子に記述子フィールドを追加します。具体的には、currencyTimeLimit
、persistPolicy
、persistPeriod
、persistLocation
、persistName
記述子フィールドがメタデータに存在する場合はそれらを追加します。AbstractReflectiveMBeanInfoAssembler
の populateMBeanDescriptor
desc
- MBean リソースの Descriptor
。managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー AbstractReflectiveMBeanInfoAssembler.setDefaultCurrencyTimeLimit(Integer)
, AbstractReflectiveMBeanInfoAssembler.applyDefaultCurrencyTimeLimit(javax.management.Descriptor)
protected void populateAttributeDescriptor(DescriptorSE desc, @Nullable MethodSE getter, @Nullable MethodSE setter, StringSE beanKey)
ManagedAttribute
属性または ManagedMetric
属性の記述子フィールドを属性記述子に追加します。AbstractReflectiveMBeanInfoAssembler
の populateAttributeDescriptor
desc
- 属性記述子 getter
- 属性のアクセサーメソッド setter
- 属性のミューテーターメソッド beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー AbstractReflectiveMBeanInfoAssembler.setDefaultCurrencyTimeLimit(Integer)
, AbstractReflectiveMBeanInfoAssembler.applyDefaultCurrencyTimeLimit(javax.management.Descriptor)
protected void populateOperationDescriptor(DescriptorSE desc, MethodSE method, StringSE beanKey)
ManagedAttribute
属性から属性記述子に記述子フィールドを追加します。具体的には、メタデータに currencyTimeLimit
記述子フィールドが存在する場合は、それを追加します。AbstractReflectiveMBeanInfoAssembler
の populateOperationDescriptor
desc
- 操作記述子 method
- 操作に対応するメソッド beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー AbstractReflectiveMBeanInfoAssembler.setDefaultCurrencyTimeLimit(Integer)
, AbstractReflectiveMBeanInfoAssembler.applyDefaultCurrencyTimeLimit(javax.management.Descriptor)