public class ModelMBeanAttributeInfo extends MBeanAttributeInfo implements DescriptorAccess
ModelMBeanAttributeInfo オブジェクトは、ModelMBean の属性を記述します。これは、関連 Descriptor を持ち、DescriptorAccess インタフェースを実装した MBeanAttributeInfo のサブクラスです。
記述子内のフィールドは次のように定義済みですが、この内容に限定されません。この表で型が Number である場合は、Long の 10 進数表現である String を使用することもできます。
| 名前 | 型 | 意味 | 
|---|---|---|
| name | String | 属性名 | 
| descriptorType | String | 必ず "attribute"。 | 
| value | Object | 属性の現在値 (キャッシュ値)。 | 
| default | Object | 属性のデフォルト値。 | 
| displayName | String | ディスプレイで使用される属性の名前。 | 
| getMethod | String | get メソッドのオペレーション記述子の名前。 | 
| setMethod | String | set メソッドのオペレーション記述子の名前 | 
| protocolMap | Descriptor | JMX 仕様ドキュメントの「Protocol Map Support」を参照。属性に適したマッピングでなければならない。エントリは実行時に更新または追加可能。 | 
| persistPolicy | String | 次のどれか:OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never。JMX 仕様ドキュメントの「MBean Descriptor Fields」を参照。 | 
| persistPeriod | Number | 永続サイクルの頻度 (秒単位)。persistPolicy が OnTimer または NoMoreOftenThan のとき使用。 | 
| currencyTimeLimit | Number | 値の有効期間 (<0 無効、=0 常に有効、>0 秒)。 | 
| lastUpdatedTimeStamp | Number | value が設定された時刻。 | 
| visibility | Number | 1 - 4 の値のうち 1:常に可視、4: ほとんど不可視。 | 
| presentationString | String | データ表現を可能にするための XML 形式の文字列。 | 
デフォルトの記述子には、name、descriptorType、および displayName フィールドが含まれます。name および displayName フィールドのデフォルト値は、属性の名前です。
注:以前のバージョンの仕様との不整合があるため、currencyTimeLimit にはゼロ以下の値を使用しないようにしてください。キャッシュに入った値が有効でないことを示す場合は、currencyTimeLimit フィールドを省略します。この値が常に有効であることを示す場合は、このフィールドに非常に大きい値を指定します。
このクラスの serialVersionUID は 6181543027787327345L です。
description, name| コンストラクタと説明 | 
|---|
| ModelMBeanAttributeInfo(ModelMBeanAttributeInfo inInfo)この ModelMBeanAttributeInfo Object から新しい ModelMBeanAttributeInfo オブジェクトを構築します。 | 
| ModelMBeanAttributeInfo(String name,                        String description,                        Method getter,                        Method setter)デフォルトの記述子で ModelMBeanAttributeInfo オブジェクトを構築します。 | 
| ModelMBeanAttributeInfo(String name,                        String description,                        Method getter,                        Method setter,                        Descriptor descriptor)ModelMBeanAttributeInfo オブジェクトを構築します。 | 
| ModelMBeanAttributeInfo(String name,                        String type,                        String description,                        boolean isReadable,                        boolean isWritable,                        boolean isIs)デフォルトの記述子で ModelMBeanAttributeInfo オブジェクトを構築します。 | 
| ModelMBeanAttributeInfo(String name,                        String type,                        String description,                        boolean isReadable,                        boolean isWritable,                        boolean isIs,                        Descriptor descriptor)ModelMBeanAttributeInfo オブジェクトを構築します。 | 
| 修飾子と型 | メソッドと説明 | 
|---|---|
| Object | clone()この ModelMBeanAttributeInfo を複製して新しい ModelMBeanAttributeInfo を作成し、返します。 | 
| Descriptor | getDescriptor()ModelMBeanAttributeInfo に関連付けられた Descriptor のコピーを取得します。 | 
| void | setDescriptor(Descriptor inDescriptor)ModelMBeanAttributeDescriptor に関連付けられた Descriptor (完全置換) を設定します。 | 
| String | toString()人間が読める形式の ModelMBeanAttributeInfo インスタンスを返します。 | 
equals, getType, hashCode, isIs, isReadable, isWritablegetDescription, getNamepublic ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter) throws IntrospectionException
Descriptor には、DescriptorKey メタ注釈を含む Method オブジェクト上の注釈が寄与するフィールドが含まれます。name - 属性の名前。description - 人間が読める形式の属性の説明。オプション。getter - 属性値の読み込みに使用するメソッド。属性が書き込み専用の場合は null。setter - 属性値の書き込みに使用するメソッド。属性が読み取り専用の場合は null。IntrospectionException - この属性の定義に整合性の問題がある場合。public ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter, Descriptor descriptor) throws IntrospectionException
Descriptor には、DescriptorKey メタ注釈を含む Method オブジェクト上の注釈が寄与するフィールドが含まれます。name - 属性の名前。description - 人間が読める形式の属性の説明。オプション。getter - 属性値の読み込みに使用するメソッド。属性が書き込み専用の場合は null。setter - 属性値の書き込みに使用するメソッド。属性が読み取り専用の場合は null。descriptor - この Attribute インスタンス用として適切なメタデータを含む Descriptor インスタンス。null の場合、デフォルトの記述子が作成される。displayName フィールドを持たない記述子には、displayName フィールドがデフォルト値で追加される。IntrospectionException - この属性の定義に整合性の問題がある場合。RuntimeOperationsException - IllegalArgumentException をラップする。記述子が無効である場合、記述子フィールド name が name パラメータと等しくない場合、または記述子フィールド descriptorType が attribute と等しくない場合。public ModelMBeanAttributeInfo(String name, String type, String description, boolean isReadable, boolean isWritable, boolean isIs)
name - 属性の名前type - 属性の型またはクラス名description - 人間が読める形式の属性の説明。isReadable - 属性が getter メソッドを持つ場合は true、そうでない場合は false。isWritable - 属性が setter メソッドを持つ場合は true、そうでない場合は false。isIs - 属性が is 取得メソッドを持つ場合は true、そうでない場合は false。public ModelMBeanAttributeInfo(String name, String type, String description, boolean isReadable, boolean isWritable, boolean isIs, Descriptor descriptor)
name - 属性の名前type - 属性の型またはクラス名description - 人間が読める形式の属性の説明。isReadable - 属性が getter メソッドを持つ場合は true、そうでない場合は false。isWritable - 属性が setter メソッドを持つ場合は true、そうでない場合は false。isIs - 属性が is 取得メソッドを持つ場合は true、そうでない場合は false。descriptor - この Attribute インスタンス用として適切なメタデータを含む Descriptor インスタンス。null の場合、デフォルトの記述子が作成される。displayName フィールドを持たない記述子には、displayName フィールドがデフォルト値で追加される。RuntimeOperationsException - IllegalArgumentException をラップする。記述子が無効である場合、記述子フィールド name が name パラメータと等しくない場合、または記述子フィールド descriptorType が attribute と等しくない場合。public ModelMBeanAttributeInfo(ModelMBeanAttributeInfo inInfo)
inInfo - 複製される ModelMBeanAttributeInfopublic Descriptor getDescriptor()
getDescriptor、インタフェース: DescriptorReadgetDescriptor、クラス: MBeanFeatureInfosetDescriptor(javax.management.Descriptor)public void setDescriptor(Descriptor inDescriptor)
setDescriptor、インタフェース: DescriptorAccessinDescriptor - ModelMBeanAttributeInfo に関連付けられた Descriptor を置換するRuntimeOperationsException - 無効な Descriptor の IllegalArgumentException をラップするgetDescriptor()public Object clone()
clone、クラス: MBeanAttributeInfoRuntimeOperationsException - フィールド名またはフィールド値が不正である場合。何らかの理由で記述子の作成に失敗した場合、この例外がスローされる。Cloneablepublic String toString()
toString、クラス: MBeanAttributeInfo バグまたは機能を送信 
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.