ModelMBeanInfoSupport
ModelMBeanInfoSupport (모델 MBean 정보 지원 클래스)
ModelMBean에 대한 메타데이터를 나타내는 클래스예요. 메타데이터 객체에 설명자(Descriptor)가 추가됐어요. ModelMBeanInfo 인터페이스를 구현하며 MBeanInfo를 상속해요.
본문
관리되고자 하는 Java 리소스는 MBeanServer의 createMBean 메서드로 ModelMBean을 인스턴스화하고, 그 인스턴스에 ModelMBeanInfo와 설명자를 설정해요. ModelMBeanInfo를 통해 노출된 속성과 연산은 다른 MBean처럼 접근 가능해져요.
주요 생성자는 다음과 같아요.
ModelMBeanInfoSupport(ModelMBeanInfo mbi): 주어진 ModelMBeanInfo의 복제본을 만들어요. 얕은 복사이며 설명자와 배열은 복제되지 않아요. 원본 설명자에 영향을 주지 않고 반환된 인스턴스의 설명자를setDescriptor로 수정하는 데 주로 유용해요.ModelMBeanInfoSupport(className, description, attributes, constructors, operations, notifications): 제공된 정보로 만들되 설명자는 기본값이에요. 기본 설명자는name=className, descriptorType="mbean", displayName=className, persistPolicy="never", log="F", visibility="1"이에요.ModelMBeanInfoSupport(className, description, ..., Descriptor): 지정된 설명자로 만들어요.
주요 메서드로는 clone()(얕은 복제), getDescriptors/setDescriptors, getDescriptor/setDescriptor, getMBeanDescriptor 등이 있어요. 이 클래스의 serialVersionUID는 -1935722590756516193L이에요.