クラス MetadataMBeanInfoAssembler

実装済みのインターフェース一覧:
InitializingBean, AutodetectCapableMBeanInfoAssembler, MBeanInfoAssembler

public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssembler implements AutodetectCapableMBeanInfoAssembler, InitializingBean
ソースレベルのメタデータから管理インターフェース情報を読み取る MBeanInfoAssembler インターフェースの実装。

JmxAttributeSource 戦略インターフェースを使用するため、サポートされている実装を使用してメタデータを読み取ることができます。すぐに使える Spring は、アノテーションに基づく実装 AnnotationJmxAttributeSource を提供します。

導入:
1.2
作成者:
Rob Harrop, Juergen Hoeller, Jennifer Hickey
関連事項:
  • コンストラクターの詳細

    • MetadataMBeanInfoAssembler

      public MetadataMBeanInfoAssembler()
      setAttributeSource(JmxAttributeSource) メソッドを介して構成する必要がある新しい MetadataMBeanInfoAssembler を作成します。
    • MetadataMBeanInfoAssembler

      public MetadataMBeanInfoAssembler(JmxAttributeSource attributeSource)
      指定された JmxAttributeSource の新しい MetadataMBeanInfoAssembler を作成します。
      パラメーター:
      attributeSource - 使用する JmxAttributeSource
  • 方法の詳細

    • setAttributeSource

      public void setAttributeSource(JmxAttributeSource attributeSource)
      Bean クラスからメタデータを読み取るために使用する JmxAttributeSource 実装を設定します。
      関連事項:
    • afterPropertiesSet

      public void afterPropertiesSet()
      インターフェースからコピーされた説明: InitializingBean
      すべての Bean プロパティを設定し、BeanFactoryAwareApplicationContextAware などを満たした後、包含 BeanFactory によって呼び出されます。

      このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。

      次で指定:
      インターフェース InitializingBean 内の afterPropertiesSet 
    • checkManagedBean

      protected void checkManagedBean(ObjectSE managedBean) throws IllegalArgumentExceptionSE
      JDK 動的プロキシが検出された場合、IllegalArgumentException をスローします。メタデータはターゲットクラスと CGLIB プロキシからのみ読み取ることができます!
      オーバーライド:
      クラス AbstractMBeanInfoAssemblercheckManagedBean 
      パラメーター:
      managedBean - 公開される Bean (AOP プロキシである可能性があります)
      例外:
      IllegalArgumentExceptionSE - Bean は露出には無効です
    • includeBean

      public boolean includeBean(ClassSE<?> beanClass, StringSE beanName)
      Bean の自動検出に使用されます。Bean のクラスに ManagedResource 属性があるかどうかを確認します。そうであれば、含まれる Bean のリストに追加されます。
      次で指定:
      インターフェース AutodetectCapableMBeanInfoAssembler 内の includeBean 
      パラメーター:
      beanClass - Bean のクラス
      beanName - Bean ファクトリ内の Bean の名前
    • includeReadAttribute

      protected boolean includeReadAttribute(MethodSE method, StringSE beanKey)
      属性アクセサーを含めることに投票します。
      次で指定:
      クラス AbstractReflectiveMBeanInfoAssemblerincludeReadAttribute 
      パラメーター:
      method - アクセサーメソッド
      beanKey - Beans マップで MBean に関連付けられているキー
      戻り値:
      メソッドに適切なメタデータがあるかどうか
    • includeWriteAttribute

      protected boolean includeWriteAttribute(MethodSE method, StringSE beanKey)
      属性ミューテーターの包含に関する投票。
      次で指定:
      クラス AbstractReflectiveMBeanInfoAssemblerincludeWriteAttribute 
      パラメーター:
      method - ミューテーターメソッド
      beanKey - Beans マップで MBean に関連付けられているキー
      戻り値:
      メソッドに適切なメタデータがあるかどうか
    • includeOperation

      protected boolean includeOperation(MethodSE method, StringSE beanKey)
      オペレーションの包含に関する投票。
      次で指定:
      クラス AbstractReflectiveMBeanInfoAssemblerincludeOperation 
      パラメーター:
      method - 操作方法
      beanKey - Beans マップで MBean に関連付けられているキー
      戻り値:
      メソッドに適切なメタデータがあるかどうか
    • getDescription

      protected StringSE getDescription(ObjectSE managedBean, StringSE beanKey)
      ソースレベルのメタデータから管理対象リソースの説明を読み取ります。説明が見つからない場合は、空の String を返します。
      オーバーライド:
      クラス AbstractMBeanInfoAssemblergetDescription 
      パラメーター:
      managedBean - Bean インスタンス (AOP プロキシである可能性があります)
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
    • getAttributeDescription

      protected StringSE getAttributeDescription(PropertyDescriptorSE propertyDescriptor, StringSE beanKey)
      このプロパティ記述子に対応する属性の説明を作成します。getter または setter 属性のメタデータを使用して説明を作成しようとします。それ以外の場合は、プロパティ名を使用します。
      オーバーライド:
      クラス AbstractReflectiveMBeanInfoAssemblergetAttributeDescription 
      パラメーター:
      propertyDescriptor - 属性の PropertyDescriptor
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      戻り値:
      属性の説明
    • getOperationDescription

      protected StringSE getOperationDescription(MethodSE method, StringSE beanKey)
      メタデータから提供された Method の説明を取得します。メタデータに説明が存在しないメソッド名を使用します。
      オーバーライド:
      クラス AbstractReflectiveMBeanInfoAssemblergetOperationDescription 
      パラメーター:
      method - 操作方法
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      戻り値:
      操作の説明
    • getOperationParameters

      protected MBeanParameterInfoSE[] getOperationParameters(MethodSE method, StringSE beanKey)
      メソッドにアタッチされた ManagedOperationParameter 属性から MBeanParameterInfo を読み取ります。属性が見つからない場合、MBeanParameterInfo の空の配列を返します。
      オーバーライド:
      クラス AbstractReflectiveMBeanInfoAssemblergetOperationParameters 
      パラメーター:
      method - パラメーター情報を取得する Method 
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      戻り値:
      MBeanParameterInfo 配列
    • getNotificationInfo

      protected ModelMBeanNotificationInfoSE[] getNotificationInfo(ObjectSE managedBean, StringSE beanKey)
      管理対象リソースの Class から ManagedNotification メタデータを読み取り、対応する ModelMBeanNotificationInfoSE メタデータを生成して返します。
      オーバーライド:
      クラス AbstractMBeanInfoAssemblergetNotificationInfo 
      パラメーター:
      managedBean - Bean インスタンス (AOP プロキシである可能性があります)
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      戻り値:
      通知メタデータ
    • populateMBeanDescriptor

      protected void populateMBeanDescriptor(DescriptorSE desc, ObjectSE managedBean, StringSE beanKey)
      ManagedResource 属性から MBean 記述子に記述子フィールドを追加します。具体的には、currencyTimeLimitpersistPolicypersistPeriodpersistLocationpersistName 記述子フィールドがメタデータに存在する場合はそれらを追加します。
      オーバーライド:
      クラス AbstractReflectiveMBeanInfoAssemblerpopulateMBeanDescriptor 
      パラメーター:
      desc - MBean リソースの Descriptor
      managedBean - Bean インスタンス (AOP プロキシである可能性があります)
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      関連事項:
    • populateAttributeDescriptor

      protected void populateAttributeDescriptor(DescriptorSE desc, @Nullable MethodSE getter, @Nullable MethodSE setter, StringSE beanKey)
      ManagedAttribute 属性または ManagedMetric 属性の記述子フィールドを属性記述子に追加します。
      オーバーライド:
      クラス AbstractReflectiveMBeanInfoAssemblerpopulateAttributeDescriptor 
      パラメーター:
      desc - 属性記述子
      getter - 属性のアクセサーメソッド
      setter - 属性のミューテーターメソッド
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      関連事項:
    • populateOperationDescriptor

      protected void populateOperationDescriptor(DescriptorSE desc, MethodSE method, StringSE beanKey)
      ManagedAttribute 属性から属性記述子に記述子フィールドを追加します。具体的には、メタデータに currencyTimeLimit 記述子フィールドが存在する場合は、それを追加します。
      オーバーライド:
      クラス AbstractReflectiveMBeanInfoAssemblerpopulateOperationDescriptor 
      パラメーター:
      desc - 操作記述子
      method - 操作に対応するメソッド
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      関連事項: