|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.management.MBeanInfo
javax.management.modelmbean.ModelMBeanInfoSupport
public class ModelMBeanInfoSupport
このクラスは、ModelMBean のメタデータを表します。メタデータオブジェクトに記述子が追加されています。
管理対象になる Java リソースは、MBeanServer の createMBean メソッドを使って、ModelMBean をインスタンス化します。次に、ModelMBean インスタンスの ModelMBeanInfo と Descriptor を設定します。ModelMBean の ModelMBeanInfo で公開された属性とオペレーションには、MBean、コネクタ、アダプタからアクセスできます。Descriptor を使って、管理対象アプリケーション内の値とメソッドを定義し、ModelMBean の属性およびオペレーションにマップすることができます。このマッピングは、ファイルを使った開発時、または実行時にプログラムを使って動的に定義できます。
MBeanServer でインスタンス化された MBean はすべて管理対象となります。これらの属性およびオペレーションには、MBeanServer に接続されたコネクタまたはアダプタ経由でリモートアクセスできます。JMX 準拠の MBean でない Java オブジェクトは、MBeanServer に登録できません。リソースは、ModelMBean をインスタンス化することにより、MBean の有効性を保証します。 すべての public メソッドで、MBeanException および RuntimeOperationsException がスローされる必要があります。これにより、分散型通信 (RMI、EJB など) からの例外のラップが可能になります。
このクラスの serialVersionUID は -1935722590756516193L です。
| コンストラクタの概要 | |
|---|---|
ModelMBeanInfoSupport(ModelMBeanInfo mbi)
指定された ModelMBeanInfo を複製して ModelMBeanInfoSupport を構築します。 |
|
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 を作成します。 |
|
| メソッドの概要 | |
|---|---|
Object |
clone()
このインスタンスのシャローコピーを返します。 |
ModelMBeanAttributeInfo |
getAttribute(String inName)
名前で要求された ModelMBeanAttributeInfo を返します。 |
ModelMBeanConstructorInfo |
getConstructor(String inName)
名前で要求された ModelMBeanConstructorInfo を返します。 |
Descriptor |
getDescriptor()
この MBeanInfo の記述子を取得します。 |
Descriptor |
getDescriptor(String inDescriptorName)
名前で要求された Descriptor を返します。 |
Descriptor |
getDescriptor(String inDescriptorName,
String inDescriptorType)
名前と descriptorType で要求された Descriptor を返します。 |
Descriptor[] |
getDescriptors(String inDescriptorType)
inDescriptorType 型の ModelMBeanInfo のすべての Descriptor で構成される Descriptor 配列を返します。 |
Descriptor |
getMBeanDescriptor()
MBean 全体ポリシーを含む ModelMBean の記述子を返します。 |
ModelMBeanNotificationInfo |
getNotification(String inName)
名前で要求された ModelMBeanNotificationInfo を返します。 |
ModelMBeanOperationInfo |
getOperation(String inName)
名前で要求された ModelMBeanOperationInfo を返します。 |
void |
setDescriptor(Descriptor inDescriptor,
String inDescriptorType)
ModelMBean の inDescriptorType 型の情報配列内に記述子を設定します。 |
void |
setDescriptors(Descriptor[] inDescriptors)
ModelMBeanInfo に記述子を追加するか、ModelMBeanInfo 内の記述子を置き換えます。 |
void |
setMBeanDescriptor(Descriptor inMBeanDescriptor)
ModelMBean の記述子を設定します。 |
| クラス javax.management.MBeanInfo から継承されたメソッド |
|---|
equals, getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperations, hashCode, toString |
| クラス java.lang.Object から継承されたメソッド |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| インタフェース javax.management.modelmbean.ModelMBeanInfo から継承されたメソッド |
|---|
getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperations |
| コンストラクタの詳細 |
|---|
public ModelMBeanInfoSupport(ModelMBeanInfo mbi)
ModelMBeanAttributeInfo[] など) も複製されません。このメソッドの主な用途は、setDescriptor を使って、元のオブジェクトの Descriptor に影響を及ぼすことなく、返されるインスタンスの Descriptor を変更することです。
mbi - ModelMBeanInfo インスタンス。 このインスタンスから作成した ModelMBeanInfo が初期化される
public ModelMBeanInfoSupport(String className,
String description,
ModelMBeanAttributeInfo[] attributes,
ModelMBeanConstructorInfo[] constructors,
ModelMBeanOperationInfo[] operations,
ModelMBeanNotificationInfo[] notifications)
className - MBean のクラス名description - 人間が読める形式の ModelMBean の説明attributes - 記述子を持つ ModelMBeanAttributeInfo オブジェクトの 配列constructors - 記述子を持つ ModelMBeanConstructorInfo オブジェクトの 配列operations - 記述子を持つ ModelMBeanOperationInfo オブジェクトの 配列notifications - 記述子を持つ ModelMBeanNotificationInfo オブジェクトの 配列
public ModelMBeanInfoSupport(String className,
String description,
ModelMBeanAttributeInfo[] attributes,
ModelMBeanConstructorInfo[] constructors,
ModelMBeanOperationInfo[] operations,
ModelMBeanNotificationInfo[] notifications,
Descriptor mbeandescriptor)
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 - Wraps an IllegalArgumentException for invalid descriptor passed in parameter. (see getMBeanDescriptor for the definition of a valid MBean descriptor.)| メソッドの詳細 |
|---|
public Object clone()
ModelMBeanAttributeInfo[] など) も複製されません。このメソッドの主な用途は、setDescriptor を使って、元のオブジェクトの Descriptor に影響を及ぼすことなく、複製の Descriptor を変更することです。
ModelMBeanInfo 内の cloneMBeanInfo 内の cloneCloneable
public Descriptor[] getDescriptors(String inDescriptorType)
throws MBeanException,
RuntimeOperationsException
ModelMBeanInfo の記述:
ModelMBeanInfo 内の getDescriptorsinDescriptorType - 返される記述子に対して設定する必要がある descriptorType フィールドの値。mbean、attribute、operation、constructor、notification のいずれか。null または空の場合、すべての型が返される
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - パラメータとして渡された descriptorType が mbean、attribute、operation、constructor、notification のいずれでもない場合、 空の場合、または null の場合、IllegalArgumentException をラップするModelMBeanInfo.setDescriptors(javax.management.Descriptor[])
public void setDescriptors(Descriptor[] inDescriptors)
throws MBeanException,
RuntimeOperationsException
ModelMBeanInfo の記述:
ModelMBeanInfo 内の setDescriptorsinDescriptors - ModelMBeanInfo 内に設定される記述子。リストの null 要素は 無視される。すべての記述子が name および descriptorType フィールドを持っている必要がある
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - 記述子が null または不正な場合、IllegalArgumentException をラップするModelMBeanInfo.getDescriptors(java.lang.String)
public Descriptor getDescriptor(String inDescriptorName)
throws MBeanException,
RuntimeOperationsException
inDescriptorName - 記述子の名前
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - 名前が null の場合、 IllegalArgumentException をラップするsetDescriptor(javax.management.Descriptor, java.lang.String)
public Descriptor getDescriptor(String inDescriptorName,
String inDescriptorType)
throws MBeanException,
RuntimeOperationsException
ModelMBeanInfo の記述:
ModelMBeanInfo 内の getDescriptorinDescriptorName - 記述子の名前inDescriptorType - 要求される記述子の 型。null または空の場合、 すべての型が検索される。有効な型は、mbean、attribute、constructor、 operation、および notification。この値は、 返される記述子の descriptorType フィールドと等しくなる
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - 記述子名が null であるか、型が null または不正な場合、IllegalArgumentException をラップする。型は、mbean、attribute、constructor、operation、notification のいずれかでなければならないModelMBeanInfo.setDescriptor(javax.management.Descriptor, java.lang.String)
public void setDescriptor(Descriptor inDescriptor,
String inDescriptorType)
throws MBeanException,
RuntimeOperationsException
ModelMBeanInfo の記述:
ModelMBeanInfo 内の setDescriptorinDescriptor - ModelMBean 内に設定される 記述子。null 以外でなければならない。すべての記述子が name および descriptorType フィールドを持っている必要があるinDescriptorType - 設定される記述子の 型。null の場合、記述子の descriptorType フィールドが 使用される。指定されている場合、この値が記述子の descriptorType フィールドに 設定されなければならない。mbean、attribute、constructor、 operation、 notification のいずれか
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - 引数が不正または null である場合、 または対応する MBeanAttributeInfo、 MBeanConstructorInfo、 MBeanNotificationInfo、 MBeanOperationInfo のいずれかでModelMBeanInfo.getDescriptor(java.lang.String, java.lang.String)
public ModelMBeanAttributeInfo getAttribute(String inName)
throws MBeanException,
RuntimeOperationsException
ModelMBeanInfo の記述:
ModelMBeanInfo 内の getAttributeinName - 取得する ModelMBeanAttributeInfo の名前。この名前の ModelMBeanAttributeInfo が存在しない場合は null が返される
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - 属性名が null の場合、 IllegalArgumentException をラップする
public ModelMBeanOperationInfo getOperation(String inName)
throws MBeanException,
RuntimeOperationsException
ModelMBeanInfo の記述:
ModelMBeanInfo 内の getOperationinName - 取得する ModelMBeanOperationInfo の名前。この名前の ModelMBeanOperationInfo が存在しない場合は null が返される
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - オペレーション名が null の場合 IllegalArgumentException をラップする
public ModelMBeanConstructorInfo getConstructor(String inName)
throws MBeanException,
RuntimeOperationsException
inName - コンストラクタの名前
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - コンストラクタ名が null の場合、 IllegalArgumentException をラップする
public ModelMBeanNotificationInfo getNotification(String inName)
throws MBeanException,
RuntimeOperationsException
ModelMBeanInfo の記述:
ModelMBeanInfo 内の getNotificationinName - 取得する ModelMBeanNotificationInfo の名前。この名前の ModelMBeanNotificationInfo が存在しない場合は null が返される
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - 通知名が null の場合 IllegalArgumentException をラップするpublic Descriptor getDescriptor()
MBeanInfo の記述:
DescriptorRead 内の getDescriptorMBeanInfo 内の getDescriptor
public Descriptor getMBeanDescriptor()
throws MBeanException
ModelMBeanInfo の記述:記述子内のフィールドは次のように定義済みですが、この内容に限定されません。
name :MBean 名 descriptorType :必ず mbean displayName :ディスプレイで使用される属性の名前 persistPolicy :OnUpdate、OnTimer、NoMoreOftenThan、OnUnregister、Always、Never persistLocation :完全修飾ディレクトリ名。MBean は、必要に応じてこのディレクトリに保持される persistFile :MBean を保持するファイルの名前 persistPeriod :秒数。OnTime および NoMoreOftenThan PersistPolicy の持続サイクルの頻度を表す currencyTimeLimit :値の有効期間。 <0 無効、=0 常に有効、>0 秒 log :t の場合はすべての通知をログに記録、f の場合は通知を記録しない logfile :イベントの記録先ファイルの完全修飾ファイル名 visibility :1 〜 4 の値のうち 1:常に可視 4:ほとんど不可視 export :この MBean をエクスポートまたは公開するとき使用する名前。 ほかの JMX エージェントはこの名前を使って MBean を検索する presentationString :データ表現と MBean を関連付けるための XML 形式の文字列
デフォルトの記述子は、name=mbeanName,descriptorType=mbean, displayName=this.getClassName(), persistPolicy=never,log=F,export=F,visibility=1 です。記述子にこれらのいずれかのフィールドが不足している場合、不足しているフィールドがデフォルト値で追加されます。
注: 以前のバージョンの仕様との不整合があるため、currencyTimeLimit にはゼロ以下の値を使用しないようにしてください。キャッシュに入った値が有効でないことを示す場合は、currencyTimeLimit フィールドを省略します。この値が常に有効であることを示す場合は、このフィールドに非常に大きい値を指定します。
ModelMBeanInfo 内の getMBeanDescriptorMBeanException - 分散通信 Exception をラップするModelMBeanInfo.setMBeanDescriptor(javax.management.Descriptor)
public void setMBeanDescriptor(Descriptor inMBeanDescriptor)
throws MBeanException,
RuntimeOperationsException
ModelMBeanInfo の記述:getMBeanDescriptor メソッドの javadoc を参照してください。
ModelMBeanInfo 内の setMBeanDescriptorinMBeanDescriptor - 設定する記述子
MBeanException - 分散通信 Exception をラップする
RuntimeOperationsException - 記述子が無効な場合、IllegalArgumentException をラップするModelMBeanInfo.getMBeanDescriptor()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。