java.lang.Object
javax.management.MBeanFeatureInfo
javax.management.MBeanAttributeInfo
javax.management.modelmbean.ModelMBeanAttributeInfo
- すべての実装されたインタフェース:
- Serializable,- Cloneable,- DescriptorAccess,- DescriptorRead
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です。
- 導入されたバージョン:
- 1.5
- 関連項目:
- 
フィールドのサマリークラス javax.management.MBeanFeatureInfoで宣言されたフィールドdescription, name
- 
コンストラクタのサマリーコンストラクタコンストラクタ説明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オブジェクトを構築します。このModelMBeanAttributeInfo Objectから新しいModelMBeanAttributeInfoオブジェクトを構築します。
- 
メソッドのサマリー修飾子と型メソッド説明clone()このModelMBeanAttributeInfoを複製して新しいModelMBeanAttributeInfoを作成し、返します。ModelMBeanAttributeInfoに関連付けられたDescriptorのコピーを取得します。voidsetDescriptor(Descriptor inDescriptor) ModelMBeanAttributeDescriptorに関連付けられたDescriptor (完全置換)を設定します。toString()人間が読める形式のModelMBeanAttributeInfoインスタンスを返します。クラス javax.management.MBeanAttributeInfoで宣言されたメソッドequals, getType, isIs, isReadable, isWritableクラス javax.management.MBeanFeatureInfoで宣言されたメソッドgetDescription, getName
- 
コンストラクタの詳細- 
ModelMBeanAttributeInfopublic ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter) throws IntrospectionException デフォルトの記述子でModelMBeanAttributeInfoオブジェクトを構築します。 構築されたオブジェクトのDescriptorには、DescriptorKeyメタ注釈を含むMethodオブジェクト上の注釈が寄与するフィールドが含まれます。- パラメータ:
- name- 属性の名前。
- description- 人間が読める形式の属性の説明。 オプション。
- getter- 属性値の読込みに使用するメソッド。 属性が書込み専用の場合はnull。
- setter- 属性値の書込みに使用するメソッド。 属性が読取り専用の場合はnull。
- 例外:
- IntrospectionException- この属性の定義に整合性の問題がある場合。
 
- 
ModelMBeanAttributeInfopublic ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter, Descriptor descriptor) throws IntrospectionException ModelMBeanAttributeInfoオブジェクトを構築します。 構築されたオブジェクトのDescriptorには、DescriptorKeyメタ注釈を含むMethodオブジェクト上の注釈が寄与するフィールドが含まれます。- パラメータ:
- name- 属性の名前。
- description- 人間が読める形式の属性の説明。 オプション。
- getter- 属性値の読込みに使用するメソッド。 属性が書込み専用の場合はnull。
- setter- 属性値の書込みに使用するメソッド。 属性が読取り専用の場合はnull。
- descriptor- このAttributeインスタンス用として適切なメタデータを含むDescriptorインスタンス。 nullの場合、デフォルトの記述子が作成される。 displayNameフィールドを持たない記述子には、displayNameフィールドがデフォルト値で追加される。
- 例外:
- IntrospectionException- この属性の定義に整合性の問題がある場合。
- RuntimeOperationsException- IllegalArgumentExceptionをラップする。 記述子が無効である場合、記述子フィールドnameがnameパラメータと等しくない場合、または記述子フィールドdescriptorTypeがattributeと等しくない場合。
 
- 
ModelMBeanAttributeInfopublic ModelMBeanAttributeInfo(String name, String type, String description, boolean isReadable, boolean isWritable, boolean isIs) デフォルトの記述子でModelMBeanAttributeInfoオブジェクトを構築します。- パラメータ:
- name- 属性の名前
- type- 属性の型またはクラス名
- description- 人間が読める形式の属性の説明。
- isReadable- 属性がgetterメソッドを持つ場合はtrue、そうでない場合はfalse。
- isWritable- 属性がsetterメソッドを持つ場合はtrue、そうでない場合はfalse。
- isIs- 属性がis取得メソッドを持つ場合はtrue、そうでない場合はfalse。
 
- 
ModelMBeanAttributeInfopublic ModelMBeanAttributeInfo(String name, String type, String description, boolean isReadable, boolean isWritable, boolean isIs, Descriptor descriptor) ModelMBeanAttributeInfoオブジェクトを構築します。- パラメータ:
- 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と等しくない場合。
 
- 
ModelMBeanAttributeInfopublic ModelMBeanAttributeInfo(ModelMBeanAttributeInfo inInfo) このModelMBeanAttributeInfo Objectから新しいModelMBeanAttributeInfoオブジェクトを構築します。 デフォルトの記述子が作成されます。- パラメータ:
- inInfo- 複製されるModelMBeanAttributeInfo
 
 
- 
- 
メソッドの詳細- 
getDescriptorpublic Descriptor getDescriptor()ModelMBeanAttributeInfoに関連付けられたDescriptorのコピーを取得します。- 定義:
- getDescriptor、インタフェース- DescriptorRead
- オーバーライド:
- getDescriptor、クラス- MBeanFeatureInfo
- 戻り値:
- ModelMBeanAttributeInfoオブジェクトに関連付けられたDescriptor。
- 関連項目:
 
- 
setDescriptorpublic void setDescriptor(Descriptor inDescriptor) ModelMBeanAttributeDescriptorに関連付けられたDescriptor (完全置換)を設定します。 新しいDescriptorがnullの場合、関連Descriptorはデフォルトの記述子に戻ります。 Descriptorの割当て前には、妥当性検査が行われます。 新しいDescriptorが無効である場合、IllegalArgumentExceptionをラップするRuntimeOperationsExceptionがスローされます。- 定義:
- setDescriptor、インタフェース- DescriptorAccess
- パラメータ:
- inDescriptor- ModelMBeanAttributeInfoに関連付けられたDescriptorを置換する
- 例外:
- RuntimeOperationsException- 無効なDescriptorのIllegalArgumentExceptionをラップする
- 関連項目:
 
- 
clonepublic Object clone()このModelMBeanAttributeInfoを複製して新しいModelMBeanAttributeInfoを作成し、返します。- オーバーライド:
- clone、クラス- MBeanAttributeInfo
- 戻り値:
- このインスタンスの複製。
- 例外:
- RuntimeOperationsException- フィールド名またはフィールド値が不正である場合。 何らかの理由で記述子の作成に失敗した場合、この例外がスローされる。
- 関連項目:
 
- 
toStringpublic String toString()人間が読める形式のModelMBeanAttributeInfoインスタンスを返します。
 
-