ModelMBeanAttributeInfo
ModelMBeanAttributeInfo (모델 MBean 속성 정보)
ModelMBean의 속성을 설명하는 객체예요. 연관된 설명자(Descriptor)와 DescriptorAccess 인터페이스 구현이 추가된 MBeanAttributeInfo의 하위 클래스예요.
본문
ModelMBeanAttributeInfo는 MBean 속성에 대한 메타데이터를 담아요. 이 클래스의 설명자는 다음 필드를 정의하지만 이에 국한되지는 않아요.
- name: 속성 이름
- descriptorType: 반드시
"attribute"여야 해요. - value: 속성의 현재(캐시된) 값
- default: 속성의 기본값
- displayName: 표시에 사용할 속성 이름
- getMethod / setMethod: get/set 메서드의 연산 설명자 이름
- persistPolicy:
OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never중 하나 - currencyTimeLimit: 값이 유효한 시간(
<0은 항상 유효하지 않음,=0은 항상 유효,>0은 초 단위) - visibility:
1-4(1은 항상 표시, 4는 거의 표시 안 함)
기본 설명자는 name, descriptorType, displayName 필드를 포함해요. name과 displayName의 기본값은 속성 이름이에요.
생성자는 여러 오버로드를 제공해요. Method getter/setter를 받는 버전, name/type/description/읽기여부/writable등을 받는 버전, ModelMBeanAttributeInfo를 복제하는 버전, 그리고 각각에 설명자를 추가한 버전이 있어요.
주요 메서드로는 getDescriptor()/setDescriptor(Descriptor)(설명자 조회/설정), clone()(복제)이 있어요. 이 클래스의 serialVersionUID는 6181543027787327345L이에요.