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, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。