java.lang.Object
javax.management.MBeanInfo
javax.management.modelmbean.ModelMBeanInfoSupport
- すべての実装されたインタフェース:
- Serializable,- Cloneable,- DescriptorRead,- ModelMBeanInfo
public class ModelMBeanInfoSupport extends MBeanInfo implements ModelMBeanInfo
このクラスは、ModelMBeanのメタデータを表します。 メタデータ・オブジェクトに記述子が追加されています。 
 
管理対象になるJavaリソースは、MBeanServerのcreateMBeanメソッドを使って、ModelMBeanをインスタンス化します。 次に、ModelMBeanインスタンスのModelMBeanInfoとDescriptorを設定します。 ModelMBeanのModelMBeanInfoで公開された属性とオペレーションには、MBean、コネクタ、アダプタからアクセスできます。 Descriptorを使って、管理対象アプリケーション内の値とメソッドを定義し、ModelMBeanの属性およびオペレーションにマップすることができます。 このマッピングは、ファイルを使った開発時、または実行時にプログラムを使って動的に定義できます。
ModelMBean内でインスタンス化される各ModelMBeanが管理対象になります。これらの属性およびオペレーションには、MBeanServerに接続されたコネクタまたはアダプタ経由でリモート・アクセスできます。 JMX準拠のMBeanでないJavaオブジェクトは、MBeanServerに登録できません。 リソースは、ModelMBeanをインスタンス化することにより、MBeanの有効性を保証します。 すべてのpublicメソッドで、MBeanExceptionおよびRuntimeOperationsExceptionがスローされる必要があります。 これにより、分散型通信(RMI、EJBなど)からの例外のラップが可能になります。
このクラスのserialVersionUIDは-1935722590756516193Lです。
- 導入されたバージョン:
- 1.5
- 関連項目:
- 直列化された形式
- 
コンストラクタのサマリーコンストラクタ コンストラクタ 説明 ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications)提供された情報でModelMBeanInfoSupportを作成します。記述子はデフォルトのものが使用されます。ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor mbeandescriptor)提供された情報とパラメータとして指定された記述子を使ってModelMBeanInfoSupportを作成します。ModelMBeanInfoSupport(ModelMBeanInfo mbi)指定されたModelMBeanInfoを複製してModelMBeanInfoSupportを構築します。
- 
メソッドのサマリー修飾子と型 メソッド 説明 Objectclone()このインスタンスのシャロー・コピーを返します。ModelMBeanConstructorInfogetConstructor(String inName)名前で要求されたModelMBeanConstructorInfoを返します。DescriptorgetDescriptor()このMBeanInfoの記述子を取得します。DescriptorgetDescriptor(String inDescriptorName)名前で要求されたDescriptorを返します。クラス javax.management.MBeanInfoで宣言されたメソッドequals, getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperationsクラス java.lang.Objectで宣言されたメソッドfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitインタフェース javax.management.modelmbean.ModelMBeanInfoで宣言されたメソッドgetAttribute, getAttributes, getClassName, getConstructors, getDescription, getDescriptor, getDescriptors, getMBeanDescriptor, getNotification, getNotifications, getOperation, getOperations, setDescriptor, setDescriptors, setMBeanDescriptor
- 
コンストラクタの詳細- 
ModelMBeanInfoSupportpublic ModelMBeanInfoSupport(ModelMBeanInfo mbi)指定されたModelMBeanInfoを複製してModelMBeanInfoSupportを構築します。 返されるオブジェクトは、指定したオブジェクトのシャロー・コピーです。 Descriptorも、含まれる配列(ModelMBeanAttributeInfo[]など)も複製されません。 このメソッドの主な用途は、setDescriptorを使って、元のオブジェクトのDescriptorに影響を及ぼすことなく、返されるインスタンスのDescriptorを変更することです。- パラメータ:
- mbi- ModelMBeanInfoインスタンス(このインスタンスから作成したModelMBeanInfoが初期化される)。
 
- 
ModelMBeanInfoSupportpublic ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications)提供された情報でModelMBeanInfoSupportを作成します。記述子はデフォルトのものが使用されます。 デフォルトの記述子は、name=className, descriptorType="mbean", displayName=className, persistPolicy="never", log="F", visibility="1"- パラメータ:
- className- MBeanのクラス名
- description- 人間が読める形式のModelMBeanの説明
- attributes- 記述子を持つModelMBeanAttributeInfoオブジェクトの配列
- constructors- 記述子を持つModelMBeanConstructorInfoオブジェクトの配列
- operations- 記述子を持つModelMBeanOperationInfoオブジェクトの配列
- notifications- 記述子を持つModelMBeanNotificationInfoオブジェクトの配列
 
- 
ModelMBeanInfoSupportpublic ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor mbeandescriptor)提供された情報とパラメータとして指定された記述子を使ってModelMBeanInfoSupportを作成します。- パラメータ:
- className- MBeanのクラス名
- description- 人間が読める形式のModelMBeanの説明
- attributes- 記述子を持つModelMBeanAttributeInfoオブジェクトの配列
- constructors- 記述子を持つModelMBeanConstructorInfoオブジェクトの配列
- operations- 記述子を持つModelMBeanOperationInfoオブジェクトの配列
- notifications- 記述子を持つModelMBeanNotificationInfoオブジェクトの配列
- mbeandescriptor- MBean全体ポリシーを含むMBeanDescriptorとして使用される記述子。 記述子がnullの場合、デフォルトの記述子が作成される。 デフォルトの記述子は、name=className, descriptorType="mbean", displayName=className, persistPolicy="never", log="F", visibility="1"。 記述子にこれらのフィールドすべてが含まれない場合は、見つからないフィールドがこれらのデフォルト値で追加される。
- 例外:
- RuntimeOperationsException- パラメータに渡される記述子が無効な場合、IllegalArgumentExceptionをラップする。(有効なMBean記述子の定義については、- getMBeanDescriptorを参照。)
 
 
- 
- 
メソッドの詳細- 
clonepublic Object clone()このインスタンスのシャロー・コピーを返します。 Descriptorも、含まれる配列(ModelMBeanAttributeInfo[]など)も複製されません。 このメソッドの主な用途は、setDescriptorを使って、元のオブジェクトのDescriptorに影響を及ぼすことなく、複製のDescriptorを変更することです。- 定義:
- clone、インタフェース:- ModelMBeanInfo
- オーバーライド:
- clone、クラス:- MBeanInfo
- 戻り値:
- このインスタンスのシャロー複製
- 関連項目:
- Cloneable
 
- 
getDescriptorpublic Descriptor getDescriptor(String inDescriptorName) throws MBeanException, RuntimeOperationsException名前で要求されたDescriptorを返します。- パラメータ:
- inDescriptorName- 記述子の名前。
- 戻り値:
- 同じ名前のModelMBeanの記述子を含む記述子。 記述子が見つからない場合、nullが返される。
- 例外:
- MBeanException- 分散通信Exceptionをラップする。
- RuntimeOperationsException- 名前がnullの場合、IllegalArgumentExceptionをラップする。
- 関連項目:
- ModelMBeanInfo.setDescriptor(javax.management.Descriptor, java.lang.String)
 
- 
getConstructorpublic ModelMBeanConstructorInfo getConstructor(String inName) throws MBeanException, RuntimeOperationsException名前で要求されたModelMBeanConstructorInfoを返します。 この名前のModelMBeanConstructorInfoが存在しない場合、nullが返されます。- パラメータ:
- inName- コンストラクタの名前。
- 戻り値:
- 指定されたコンストラクタのコンストラクタ情報。存在しない場合はnull。
- 例外:
- MBeanException- 分散通信Exceptionをラップする。
- RuntimeOperationsException- コンストラクタ名がnullの場合、IllegalArgumentExceptionをラップする。
 
- 
getDescriptorpublic Descriptor getDescriptor()次のクラスからコピーされた説明:MBeanInfoこのMBeanInfoの記述子を取得します。 戻り値を変更しても、元の記述子は影響を受けません。- 定義:
- getDescriptor、インタフェース:- DescriptorRead
- オーバーライド:
- getDescriptor、クラス:- MBeanInfo
- 戻り値:
- 不変またはオリジナルのコピーである記述子。
- 導入されたバージョン:
- 1.6
 
 
-