クラス MethodNameBasedMBeanInfoAssembler

実装されたすべてのインターフェース:
MBeanInfoAssembler

public class MethodNameBasedMBeanInfoAssembler extends AbstractConfigurableMBeanInfoAssembler
MBean 操作および属性として公開されるメソッド名を指定できる AbstractReflectiveMBeanInfoAssembler のサブクラス。JavaBean getter および setter は、JMX 属性として自動的に公開されます。

managedMethods プロパティを介してメソッド名の配列を指定できます。複数の Bean があり、各 Bean で異なるメソッド名のセットを使用する場合は、methodMappings プロパティを使用して、Bean キー(Bean を MBeanExporter に渡すために使用される名前)をメソッド名のリストにマップできます。

methodMappings と managedMethods の両方の値を指定した場合、Spring は最初にマッピングでメソッド名を見つけようとします。Bean のメソッド名が見つからない場合、managedMethods で定義されたメソッド名が使用されます。

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

    • MethodNameBasedMBeanInfoAssembler

      public MethodNameBasedMBeanInfoAssembler()
  • メソッドの詳細

    • setManagedMethods

      public void setManagedMethods(StringSE... methodNames)
      管理情報の作成に使用するメソッド名の配列を設定します。これらのメソッド名は、methodMappings プロパティでその Bean に対応するエントリが見つからない場合、Bean に使用されます。
      パラメーター:
      methodNames - 使用するメソッドを示すメソッド名の配列
      関連事項:
    • setMethodMappings

      public void setMethodMappings(PropertiesSE mappings)
      Bean キーのマッピングをメソッド名のコンマ区切りリストに設定します。プロパティキーは Bean キーと一致し、プロパティ値はメソッド名のリストと一致する必要があります。Bean のメソッド名を検索するとき、Spring は最初にこれらのマッピングをチェックします。
      パラメーター:
      mappings - Bean キーのメソッド名へのマッピング
    • includeReadAttribute

      protected boolean includeReadAttribute(MethodSE method, StringSE beanKey)
      クラスからコピーされた説明: AbstractReflectiveMBeanInfoAssembler
      サブクラスが特定の属性アクセサーの包含について投票できるようにします。
      次で指定:
      クラス AbstractReflectiveMBeanInfoAssemblerincludeReadAttribute 
      パラメーター:
      method - アクセサー Method
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      戻り値:
      アクセサーを管理インターフェースに含める場合は true、それ以外の場合は false
    • includeWriteAttribute

      protected boolean includeWriteAttribute(MethodSE method, StringSE beanKey)
      クラスからコピーされた説明: AbstractReflectiveMBeanInfoAssembler
      サブクラスが特定の属性ミューテーターの包含について投票できるようにします。
      次で指定:
      クラス AbstractReflectiveMBeanInfoAssemblerincludeWriteAttribute 
      パラメーター:
      method - ミューテータ Method
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      戻り値:
      ミューテーターを管理インターフェースに含める場合は true、それ以外の場合は false
    • includeOperation

      protected boolean includeOperation(MethodSE method, StringSE beanKey)
      クラスからコピーされた説明: AbstractReflectiveMBeanInfoAssembler
      サブクラスが特定の操作の包含について投票できるようにします。
      次で指定:
      クラス AbstractReflectiveMBeanInfoAssemblerincludeOperation 
      パラメーター:
      method - 操作方法
      beanKey - MBeanExporter の Bean マップで MBean に関連付けられているキー
      戻り値:
      操作を管理インターフェースに含めるかどうか
    • isMatch

      protected boolean isMatch(MethodSE method, StringSE beanKey)