public abstract class AbstractMBeanInfoAssembler extends ObjectSE implements MBeanInfoAssembler
ModelMBeanInfo
インスタンスの作成をカプセル化するが、メタデータの作成をサブクラスに委譲する MBeanInfoAssembler
インターフェースの抽象実装。 このクラスは、マネージド Bean インスタンスからの 2 種類のクラス抽出を提供します。getTargetClass(java.lang.Object)
は、あらゆる種類の AOP プロキシの背後にあるターゲットクラスを抽出し、getClassToExpose(java.lang.Object)
は、アノテーションを検索して JMX ランタイムに公開されるクラスまたはインターフェースを返します。
コンストラクターと説明 |
---|
AbstractMBeanInfoAssembler() |
修飾子と型 | メソッドと説明 |
---|---|
protected void | checkManagedBean(ObjectSE managedBean) 指定された Bean インスタンスを確認し、このアセンブラで公開できない場合は IllegalArgumentException をスローします。 |
protected abstract ModelMBeanAttributeInfoSE[] | getAttributeInfo(ObjectSE managedBean, StringSE beanKey) MBean リソースの属性メタデータを取得します。 |
protected StringSE | getClassName(ObjectSE managedBean, StringSE beanKey) MBean リソースのクラス名を取得します。 |
protected ClassSE<?> | getClassToExpose(ClassSE<?> beanClass) 指定された Bean クラスに公開するクラスまたはインターフェースを返します。 |
protected ClassSE<?> | getClassToExpose(ObjectSE managedBean) 指定された Bean に公開するクラスまたはインターフェースを返します。 |
protected ModelMBeanConstructorInfoSE[] | getConstructorInfo(ObjectSE managedBean, StringSE beanKey) MBean リソースのコンストラクターメタデータを取得します。 |
protected StringSE | getDescription(ObjectSE managedBean, StringSE beanKey) MBean リソースの説明を取得します。 |
ModelMBeanInfoSE | getMBeanInfo(ObjectSE managedBean, StringSE beanKey) すべての JMX 実装で提供される ModelMBeanInfoSupport クラスのインスタンスを作成し、サブクラスへの呼び出しを通じてメタデータを設定します。 |
protected ModelMBeanNotificationInfoSE[] | getNotificationInfo(ObjectSE managedBean, StringSE beanKey) MBean リソースの通知メタデータを取得します。 |
protected abstract ModelMBeanOperationInfoSE[] | getOperationInfo(ObjectSE managedBean, StringSE beanKey) MBean リソースの操作メタデータを取得します。 |
protected ClassSE<?> | getTargetClass(ObjectSE managedBean) 指定された Bean インスタンスの実際の Bean クラスを返します。 |
protected void | populateMBeanDescriptor(DescriptorSE descriptor, ObjectSE managedBean, StringSE beanKey) ModelMBeanInfo インスタンスが構築された後、それが MBeanExporter に渡される前に呼び出されます。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public ModelMBeanInfoSE getMBeanInfo(ObjectSE managedBean, StringSE beanKey) throws JMExceptionSE
ModelMBeanInfoSupport
クラスのインスタンスを作成し、サブクラスへの呼び出しを通じてメタデータを設定します。MBeanInfoAssembler
の getMBeanInfo
managedBean
- 公開される Bean (AOP プロキシである可能性があります)beanKey
- 管理された Bean に関連付けられたキー JMExceptionSE
- エラーの場合 getDescription(Object, String)
, getAttributeInfo(Object, String)
, getConstructorInfo(Object, String)
, getOperationInfo(Object, String)
, getNotificationInfo(Object, String)
, populateMBeanDescriptor(javax.management.Descriptor, Object, String)
protected void checkManagedBean(ObjectSE managedBean) throws IllegalArgumentExceptionSE
デフォルトの実装は空で、すべての Bean インスタンスを受け入れます。
managedBean
- 公開される Bean (AOP プロキシである可能性があります)IllegalArgumentExceptionSE
- Bean は露出には無効です protected ClassSE<?> getTargetClass(ObjectSE managedBean)
デフォルトの実装では、AOP プロキシのターゲットクラスを返し、その他のプレーンな Bean クラスを返します。
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)AopUtils.getTargetClass(Object)
protected ClassSE<?> getClassToExpose(ObjectSE managedBean)
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)JmxUtils.getClassToExpose(Object)
protected ClassSE<?> getClassToExpose(ClassSE<?> beanClass)
beanClass
- Bean クラス (AOP プロキシクラスの可能性があります)JmxUtils.getClassToExpose(Class)
protected StringSE getClassName(ObjectSE managedBean, StringSE beanKey) throws JMExceptionSE
デフォルトの実装は、クラス名に基づいて MBean の簡単な説明を返します。
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー JMExceptionSE
- エラーの場合 protected StringSE getDescription(ObjectSE managedBean, StringSE beanKey) throws JMExceptionSE
デフォルトの実装は、クラス名に基づいて MBean の簡単な説明を返します。
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー JMExceptionSE
- エラーの場合 protected void populateMBeanDescriptor(DescriptorSE descriptor, ObjectSE managedBean, StringSE beanKey) throws JMExceptionSE
ModelMBeanInfo
インスタンスが構築された後、それが MBeanExporter
に渡される前に呼び出されます。サブクラスはこのメソッドを実装して、MBean メタデータに記述子を追加できます。デフォルトの実装は空です。
descriptor
- MBean リソースの Descriptor
。managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー JMExceptionSE
- エラーの場合 protected ModelMBeanConstructorInfoSE[] getConstructorInfo(ObjectSE managedBean, StringSE beanKey) throws JMExceptionSE
デフォルトの実装は、ModelMBeanConstructorInfo
の空の配列を返します。
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー JMExceptionSE
- エラーの場合 protected ModelMBeanNotificationInfoSE[] getNotificationInfo(ObjectSE managedBean, StringSE beanKey) throws JMExceptionSE
デフォルトの実装は、ModelMBeanNotificationInfo
の空の配列を返します。
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー JMExceptionSE
- エラーの場合 protected abstract ModelMBeanAttributeInfoSE[] getAttributeInfo(ObjectSE managedBean, StringSE beanKey) throws JMExceptionSE
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー JMExceptionSE
- エラーの場合 protected abstract ModelMBeanOperationInfoSE[] getOperationInfo(ObjectSE managedBean, StringSE beanKey) throws JMExceptionSE
managedBean
- Bean インスタンス (AOP プロキシである可能性があります)beanKey
- MBeanExporter
の Bean マップで MBean に関連付けられているキー JMExceptionSE
- エラーの場合