|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
public interface ModelMBeanNotificationBroadcaster
ModelMBean 는, 이 인터페이스를 구현할 필요가 있습니다. 이 인터페이스의 구현은, 모든 JMX 에이전트에 부속되어 있습니다.
관리 대상이 되는 Java 자원은, MBeanServer 의 createMBean 메소드를 사용해, ModelMBean 를 인스턴스화합니다. 다음에, ModelMBean 인스턴스의 ModelMBeanInfo (Descriptor 첨부)를 설정합니다. ModelMBean 의 ModelMBeanInfo 에서 공개된 속성과 오퍼레이션에는, MBean, 연결기, 어댑터로부터 액세스 할 수 있습니다. ModelMBeanInfo Descriptor 를 사용해, 관리 대상 어플리케이션내의 값과 메소드를 정의해, ModelMBean 의 속성 및 오퍼레이션에 맵 할 수가 있습니다. 이 매핑은, XML 형식의 파일을 사용한 개발시, 또는 실행시에 프로그램을 사용해 동적으로 정의할 수 있습니다.
MBeanServer 로 인스턴스화 된 MBean 는 모두 관리 대상이 됩니다. 이러한 속성 및 오퍼레이션에는, MBeanServer 에 접속된 연결기 또는 어댑터 경유로 원격 접근 할 수 있습니다. JMX 준거의 MBean 가 아닌 Java 객체는, MBeanServer 에 등록할 수 없습니다. 자원은, ModelMBean 를 인스턴스화하는 것으로, MBean 의 유효성을 보증합니다.
모든 public 메소드로, MBeanException 및 RuntimeOperationsException 가 throw 될 필요가 있습니다. 이렇게 하는 것으로, 분산형 통신 (RMI, EJB 등)에 의한 예외를 랩 할 수 있습니다. 스펙 및 javadoc 에 기재되어 있는 시나리오 이외에서는, 구현이 반드시 이러한 예외를 throw 한다고는 할 수 없습니다.
| 메소드의 개요 | |
|---|---|
void |
addAttributeChangeNotificationListener (NotificationListener listener,
String attributeName,
Object handback)
NotificationListener 인터페이스를 구현하는 객체를 청취자로서 등록합니다. |
void |
removeAttributeChangeNotificationListener (NotificationListener listener,
String attributeName)
RequiredModelMBean 로부터 attributeChangeNotification 의 청취자를 삭제합니다. |
void |
sendAttributeChangeNotification (Attribute oldValue,
Attribute newValue)
ModelMBean 상의 등록이 끝난 AttributeChangeNotification 청취자에게, 속성의 낡은 값과 새로운 값을 포함한 attributeChangeNotification 를 송신합니다. |
void |
sendAttributeChangeNotification (AttributeChangeNotification notification)
ModelMBean 상의 등록이 끝난 attributeChangeNotification 청취자에게 건네지는 attributeChangeNotification 를 송신합니다. |
void |
sendNotification (Notification ntfyObj)
ModelMBean 상의 등록이 끝난 Notification 청취자에게, jmx.modelmbean.generic 통지로서 건네받는 Notification 를 송신합니다. |
void |
sendNotification (String ntfyText)
ModelMBean 상의 등록이 끝난 Notification 청취자에게 건네지는 텍스트 캐릭터 라인을 포함한 Notification 를 송신합니다. |
| 인터페이스 javax.management. NotificationBroadcaster 로부터 상속된 메소드 |
|---|
addNotificationListener , getNotificationInfo , removeNotificationListener |
| 메소드의 상세 |
|---|
void sendNotification(Notification ntfyObj)
throws MBeanException ,
RuntimeOperationsException
ntfyObj - 청취자 객체의
handleNotification 메소드에게 건네지는 통지
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다.
파라미터로서 건네받은 Notification 객체가 null 의 경우
void sendNotification(String ntfyText)
throws MBeanException ,
RuntimeOperationsException
ntfyText - Notification 로 지정되어
청취자 객체의 handleNotification 메소드에게 건네지는 텍스트.
구축 끝난 Notification 를 다음에 나타냅니다.
type "jmx.modelmbean.generic"
source 이 ModelMBean 인스턴스
sequence 1
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다.
파라미터로서 건네받은 Notification 텍스트 캐릭터 라인이 null 의 경우
void sendAttributeChangeNotification(AttributeChangeNotification notification)
throws MBeanException ,
RuntimeOperationsException
notification - 청취자 객체의
handleNotification 메소드에게 건네지는 통지
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터로서 건네받은 AttributeChangeNotification 객체가 null 의 경우
void sendAttributeChangeNotification(Attribute oldValue,
Attribute newValue)
throws MBeanException ,
RuntimeOperationsException
oldValue - Attribute 의 초기치newValue - Attribute 의 현재의 값
구축 끝난 attributeChangeNotification. type "jmx.attribute.change" source 이 ModelMBean 인스턴스 sequence 1 attributeName oldValue.getName() attributeType oldValue 의 클래스 attributeOldValue oldValue.getValue() attributeNewValue newValue.getValue()
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터로서 건네받는 Attribute 객체가 null 인 경우,
또는 파라미터에 같은 이름의 Attribute 객체가 복수 지정되었을 경우
void addAttributeChangeNotificationListener(NotificationListener listener,
String attributeName,
Object handback)
throws MBeanException ,
RuntimeOperationsException ,
IllegalArgumentException
listener - 등록이 끝난 MBean 가 발행한 통지를 처리하는 청취자 객체attributeName - ModelMBean 속성의 이름. 이 속성의 변경 통지를 수신한다.
null 의 경우, 어느 속성이 변경되었을 때도 attributeChangeNotification 가 발행되는handback - 통지가 발행되었을 때 통지와 함께 청취자에게 송신되는 문맥
IllegalArgumentException - 청취자는 null 로 할 수 없다
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터로서 건네받는 속성명이 존재하지 않는 경우removeAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String)
void removeAttributeChangeNotificationListener(NotificationListener listener,
String attributeName)
throws MBeanException ,
RuntimeOperationsException ,
ListenerNotFoundException
listener - 등록이 끝난 MBean 가 발행한 통지를 처리하고 있던 청취자의 이름.
이 메소드는 이 청취자에 관한 모든 정보를 삭제하는attributeName - 속성. 청취자는, 이 속성의 attributeChangeNotification 를 수신할 필요가 없어졌다.
null 의 경우, 모든 attributeChangeNotification 의 청취자가 삭제된다
ListenerNotFoundException - 청취자가 MBean 에 등록되지 않은지, null 의 경우
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - inAttributeName 파라미터가 속성명에 일치하지 않는 경우,
IllegalArgumentException 를 랩 한다. addAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String, java.lang.Object)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.