|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.management.modelmbean.RequiredModelMBean
public class RequiredModelMBean
이 클래스는, ModelMBean 의 구현입니다. 모든 JMX 에이전트에 적절한 ModelMBean 의 구현이 부속되어 있을 필요가 있습니다. 또, 클래스명은 반드시 RequiredModelMBean 로 합니다.
관리 대상이 되는 Java 자원은, MBeanServer 의 createMBean 메소드를 사용해, RequiredModelMBean 를 인스턴스화합니다. 다음에, RequiredModelMBean 인스턴스의 MBeanInfo 및 Descriptor 를 설정합니다. ModelMBean 의 ModelMBeanInfo 에서 공개된 속성과 오퍼레이션에는, MBean, 연결기, 어댑터로부터 액세스 할 수 있습니다. Descriptor 를 사용해, 관리 대상 어플리케이션내의 값과 메소드를 정의해, ModelMBean 의 속성 및 오퍼레이션에 맵 할 수가 있습니다. 이 매핑은, XML 형식의 파일내, 또는 실행시에 프로그램을 사용해 동적으로 정의할 수 있습니다.
MBeanServer 내에서 인스턴스화 되는 각 RequiredModelMBean 가 관리 대상이 됩니다.
이러한 속성 및 오퍼레이션에는, MBeanServer 에 접속된 연결기 또는 어댑터 경유로 원격 접근 할 수 있습니다.
JMX 준거의 MBean 가 아닌 Java 객체는, MBeanServer 에 등록할 수 없습니다. RequiredModelMBean 를 인스턴스화하는 것으로, 자원은 MBean 가 유효한 것이 보증됩니다. 모든 public 메소드로, MBeanException 및 RuntimeOperationsException 가 throw 될 필요가 있습니다. 이것에 의해, 분산형 통신 (RMI, EJB 등)으로부터의 예외의 랩이 가능하게 됩니다.
생성자 의 개요 | |
---|---|
RequiredModelMBean ()
빈 상태(empty)의 ModelMBeanInfo 으로 RequiredModelMBean 를 구축합니다. |
|
RequiredModelMBean (ModelMBeanInfo mbi)
건네받은 ModelMBeanInfo 을 사용해 RequiredModelMBean 객체를 구축합니다. |
메소드의 개요 | |
---|---|
void |
addAttributeChangeNotificationListener (NotificationListener inlistener,
String inAttributeName,
Object inhandback)
NotificationListener 인터페이스를 구현하는 객체를 청취자로서 등록합니다. |
void |
addNotificationListener (NotificationListener listener,
NotificationFilter filter,
Object handback)
NotificationListener 인터페이스를 구현하는 객체를 청취자로서 등록합니다. |
Object |
getAttribute (String attrName)
이 ModelMBean 에 정의된 특정의 속성의 값을 돌려줍니다. |
AttributeList |
getAttributes (String [] attrNames)
ModelMBean 내의 복수의 속성의 값을 돌려줍니다. |
protected ClassLoaderRepository |
getClassLoaderRepository ()
클래스의 로드에 사용된 클래스 로더 리포지터리(repository)를 돌려줍니다. |
MBeanInfo |
getMBeanInfo ()
이 RequiredModelMBean 가 관리용으로서 공개하는 속성, 오퍼레이션, 생성자 , 및 통지를 돌려줍니다. |
MBeanNotificationInfo [] |
getNotificationInfo ()
RequiredModelMBean 에 의해 생성된 Notification 의 배열을 돌려줍니다. |
Object |
invoke (String opName,
Object [] opArgs,
String [] sig)
RequiredModelMBean 로부터 메소드를 호출해, 그 실행 결과를 돌려줍니다. |
void |
load ()
이 MBean 인스턴스를 지속 스토어내의 MBean 용 데이터로 인스턴스화합니다. |
void |
postDeregister ()
MBean 서버로부터 등록 해제한 뒤, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다. |
void |
postRegister (Boolean registrationDone)
MBean 서버에의 등록이 성공 또는 실패한 뒤, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다. |
void |
preDeregister ()
MBean 서버로부터 등록 해제하기 전에, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다. |
ObjectName |
preRegister (MBeanServer server,
ObjectName name)
MBean 서버에 등록하기 전에, MBean 에 필요한 오퍼레이션을 실행시킬 수가 있습니다. |
void |
removeAttributeChangeNotificationListener (NotificationListener inlistener,
String inAttributeName)
RequiredModelMBean 로부터 attributeChangeNotification 의 청취자를 삭제합니다. |
void |
removeNotificationListener (NotificationListener listener)
RequiredModelMBean 로부터 Notification 의 청취자를 삭제합니다. |
void |
removeNotificationListener (NotificationListener listener,
NotificationFilter filter,
Object handback)
이 MBean 로부터 청취자를 삭제합니다. |
void |
sendAttributeChangeNotification (Attribute inOldVal,
Attribute inNewVal)
ModelMBean 상의 등록이 끝난 AttributeChangeNotification 청취자에게, 속성의 낡은 값과 새로운 값을 포함한 attributeChangeNotification 를 송신합니다. |
void |
sendAttributeChangeNotification (AttributeChangeNotification ntfyObj)
ModelMBean 상의 등록이 끝난 attributeChangeNotification 청취자에게 건네지는 attributeChangeNotification 를 송신합니다. |
void |
sendNotification (Notification ntfyObj)
ModelMBean 상의 등록이 끝난 Notification 청취자에게, jmx.modelmbean.generic 통지로서 건네받는 Notification 를 송신합니다. |
void |
sendNotification (String ntfyText)
ModelMBean 상의 등록이 끝난 Notification 청취자에게 건네지는 텍스트 캐릭터 라인을 포함한 Notification 를 송신합니다. |
void |
setAttribute (Attribute attribute)
지정의 ModelMBean 의 특정의 속성의 값을 설정합니다. |
AttributeList |
setAttributes (AttributeList attributes)
이 ModelMBean 의 속성의 배열의 값을 설정합니다. |
void |
setManagedResource (Object mr,
String mr_type)
이 ModelMBean 관리 인터페이스내의 모든 메소드 (MBeanInfo 와 Descriptor)의 실행 대상이 되는, 객체의 인스턴스 핸들을 설정합니다. |
void |
setModelMBeanInfo (ModelMBeanInfo mbi)
ModelMBeanInfo 를 사용해 ModelMBean 객체를 초기화합니다. |
void |
store ()
이 MBean 인스턴스의 현재 상태를 수중에 넣어, 지속 스토어에 써냅니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public RequiredModelMBean() throws MBeanException , RuntimeOperationsException
RequiredModelMBean
를 구축합니다.
RequiredModelMBean 의 MBeanInfo 및 Descriptor 은,setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo)
메소드로 커스터마이즈 할 수 있습니다. RequiredModelMBean 의 MBeanInfo 및 Descriptor 의 커스터마이즈 후, RequiredModelMBean 를 MBeanServer 에 등록할 수가 있습니다.
MBeanException
- 분산 통신 Exception 를 랩 한다
RuntimeOperationsException
- 객체의 구축시에 RuntimeException
를 랩 한다public RequiredModelMBean(ModelMBeanInfo mbi) throws MBeanException , RuntimeOperationsException
setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo)
메소드를 사용해 RequiredModelMBean 의 MBeanInfo 및 Descriptor 를 커스터마이즈 할 수 있습니다. RequiredModelMBean 의 MBeanInfo 및 Descriptor 의 커스터마이즈 후, RequiredModelMBean 를 MBeanServer 에 등록할 수가 있습니다.
mbi
- RequiredModelMBean 에 의해 사용된다
ModelMBeanInfo 객체. 지정된 ModelMBeanInfo 가,
setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo)
로 지정된 것처럼 복제되어 변경된다
MBeanException
- 분산 통신 Exception 를 랩 한다
RuntimeOperationsException
- {link java.lang.IllegalArgumentException} 를
랩 한다.
파라미터에게 건네지는 MBeanInfo 가 null 의 경우메소드의 상세 |
---|
public void setModelMBeanInfo(ModelMBeanInfo mbi) throws MBeanException , RuntimeOperationsException
ModelMBean 가 현재 등록되어 있는 경우, 이 메소드는 IllegalStateException
를 랩 하는 RuntimeOperationsException
를 throw 합니다.
지정의 inModelMBeanInfo 에 GENERIC
또는 ATTRIBUTE_CHANGE
통지 ModelMBeanNotificationInfo
가 포함되지 않는 경우, RequiredModelMBean 에 의해, 디폴트 ModelMBeanNotificationInfo
가 제공됩니다.
ModelMBean
내의 setModelMBeanInfo
mbi
- ModelMBean 에 의해 사용된다
ModelMBeanInfo 객체
MBeanException
- 분산 통신 Exception 를
랩 한다
RuntimeOperationsException
- IllegalArgumentException
를 랩 한다IllegalStateException
를 랩 한다public void setManagedResource(Object mr, String mr_type) throws MBeanException , RuntimeOperationsException , InstanceNotFoundException , InvalidTargetObjectTypeException
ModelMBean
내의 setManagedResource
mr
- 관리 대상의 자원이 되어 있는 객체mr_type
- 관리 대상의 자원의 참조의 형태
MBeanException
- 객체의 이니샤라이자가
예외를 throw 했을 경우
InstanceNotFoundException
- 관리 대상의 자원 객체가
발견되지 않는 경우
InvalidTargetObjectTypeException
- 관리 대상의 자원의 형태는
ObjectReference 가 아니면 안된다
RuntimeOperationsException
- 자원의 설정시에 RuntimeException
를 랩 한다public void load() throws MBeanException , RuntimeOperationsException , InstanceNotFoundException
이 MBean 인스턴스를 지속 스토어내의 MBean 용 데이터로 인스턴스화합니다. 데이터로서 속성과 오퍼레이션의 값을 로드할 수 있습니다.
이 메소드는, 이 인스턴스의 구축 또는 초기화시, MBean 를 MBeanServer 에 등록하기 전에 호출합니다.
이 클래스의 구현이 지속성을 지원하지 않는 경우,ServiceNotFoundException
를 랩 하는 MBeanException
가 throw 됩니다.
PersistentMBean
내의 load
MBeanException
- 그 외의 예외를 랩 하는 경우,
또는 지속성이 지원되지 않는 경우
RuntimeOperationsException
- 지속 기구로부터의 예외를
랩 하는 경우
InstanceNotFoundException
- 이 MBean 가 발견되지 않는 경우,
또는 지속 스토리지로부터 로드할 수 없는 경우public void store() throws MBeanException , RuntimeOperationsException , InstanceNotFoundException
이 MBean 인스턴스의 현재 상태를 수중에 넣어, 지속 스토어에 써냅니다. 속성이나 오퍼레이션의 값이, 상태로서 포함되는 경우도 있습니다.
이 클래스의 구현이 지속성을 지원하지 않는 경우,ServiceNotFoundException
를 랩 하는 MBeanException
가 throw 됩니다.
MBean 의 지속성 정책 및 속성 기술자를 사용해, 이 메소드의 실행을 제어합니다. persistPolicy 필드가 다음의 내용이 되어 있는 경우, MBean 는 포함됩니다.
! = "never" = "always" = "onTimer" and now > 'lastPersistTime' + 'persistPeriod' = "NoMoreOftenThan" and now > 'lastPersistTime' + 'persistPeriod' = "onUnregister"
persistPolicy 필드가 다음의 내용이 되어 있는 경우, MBean 는 포함되지 않습니다.
! = "never" = "onUpdate" = "onTimer" && now < 'lastPersistTime' + 'persistPeriod'
PersistentMBean
내의 store
MBeanException
- 그 외의 예외를 랩 하는 경우,
또는 지속성이 지원되지 않는 경우
RuntimeOperationsException
- 지속 기구로부터의 예외를
랩 하는 경우
InstanceNotFoundException
- 지속 스토어가 발견되지 않는 경우,
또는 액세스 할 수 없는 경우public MBeanInfo getMBeanInfo()
DynamicMBean
내의 getMBeanInfo
public Object invoke(String opName, Object [] opArgs, String [] sig) throws MBeanException , ReflectionException
불려 가는 메소드와 시그니챠가 RequiredModelMbean 로부터 액세스 가능한 메소드의 어느 쪽인가에 일치하고 있는 경우, 이 메소드가 불려 갑니다. 그 이외의 경우, 관리 대상의 자원상에서, 지정의 메소드의 호출이 시행됩니다.
오퍼레이션에 의해 반환되는 마지막 값은, ModelMBeanOperationInfo 의 기술자내의 오퍼레이션 기술자에게 캐쉬되는 일이 있습니다. 유효한 값이 존재하는 경우, value 필드내에 존재합니다. 값이 캐쉬될지 어떨지는, 기술자내의 currencyTimeLimit 필드의 값에 의해 정해집니다.
주: 이전의 버젼의 스펙과의 부정합이 있기 (위해)때문에,currencyTimeLimit
에는 제로 이하의 값을 사용하지 않게 해 주세요. 캐쉬에 들어간 값이 유효하지 않은 것을 나타내는 경우는,currencyTimeLimit
필드를 생략 합니다. 이 값이 항상 유효한 것을 나타내는 경우는, 이 필드에 매우 큰 값을 지정합니다.
DynamicMBean
내의 invoke
opName
- 불려 가는 메소드의 이름. 클래스명을 포함한 완전 수식 메소드명.
오퍼레이션 기술자의
class 필드에
클래스명이 정의되고 있는 경우는 메소드명만opArgs
- 오퍼레이션의 호출시로 설정된다
파라미터를 포함한 배열sig
- 오퍼레이션의 시그니챠를
포함한 배열. 클래스 객체의 로드에는,
오퍼레이션을 호출한 MBean 를 로드할 때와
같은 클래스 로더가 사용된다
MBeanException
- 다음의 몇개의 Exception 를 랩 한다:
ServiceNotFoundException
. ModelMBeanOperationInfo 가 존재하지 않는 경우,
지정의 오퍼레이션의 기술자가 정의되어 있지 않은 경우,
또는 관리 대상의 자원이 null 의 경우InvalidTargetObjectTypeException
. targetType 필드의 값이
objectReference 가 아닌 경우ReflectionException
- 메소드의 호출시에 throw 된다
Exception
를 랩 한다
RuntimeOperationsException
- IllegalArgumentException
를
(을)를 랩 한다. 메소드명이 null 의 경우public Object getAttribute(String attrName) throws AttributeNotFoundException , MBeanException , ReflectionException
주: 이전의 버젼의 스펙과의 부정합이 있기 (위해)때문에,currencyTimeLimit
에는 제로 이하의 값을 사용하지 않게 해 주세요. 캐쉬에 들어간 값이 유효하지 않은 것을 나타내는 경우는,currencyTimeLimit
필드를 생략 합니다. 이 값이 항상 유효한 것을 나타내는 경우는, 이 필드에 매우 큰 값을 지정합니다.
getMethod 필드에 유효한 오퍼레이션 기술자의 이름이 포함되는 경우, 이 오퍼레이션 기술자에 의해 기술된 메소드가 실행됩니다. 메소드는, 응답으로서 속성치를 돌려줍니다. 오퍼레이션이 실패했을 경우, 또는 반환값의 형태가 속성의 선언형과 호환성이 없는 경우, 예외가 throw 됩니다.
getMethod 필드가 정의되어 있지 않은 경우, 속성의 디폴트 값가 돌려주어집니다. 반환값의 형태가 속성의 선언형과 호환성이 없는 경우, 예외가 throw 됩니다.
속성의 선언형은,MBeanAttributeInfo.getType()
에 의해 반환되는 String 입니다. 다음중 한쪽이 들어맞는 경우, 값은 이 형태와 호환성이 있습니다.
이 구현으로, getMethod 를 호출할 필요가 있는 경우는, 호출이 정상적으로 행해지도록(듯이), 이 getMethod 에 대해서 오퍼레이션을 지정할 필요가 있습니다. 이것은, 메소드가 표준의 호출 메소드로부터 불려 가 operationInfo 가 필요하게 되기 때문입니다.
DynamicMBean
내의 getAttribute
attrName
- 취득하는 속성의 이름을
지정하는 StringModelMBeanAttributeInfo 의 이름에
일치하고 있을 필요가 있다
AttributeNotFoundException
- 지정의 속성이 MBean 에
액세스 할 수 없는 경우.
다음의 경우, AttributeNotFoundException 가 throw 될 가능성이 있다
MBeanException
- 다음의 몇개의 Exception 를 랩 한다:
InvalidAttributeValueException
. 속성의 취득 메소드로부터 받은 값의 형태가 부정한 경우,
또는 속성의 기술자내에 getMethod 필드가
정의되지 않고,
디폴트 값가 존재하지 않는 경우ServiceNotFoundException
. 속성의
취득 메소드에 대해서 ModelMBeanOperationInfo 가 정의되어 있지 않은 경우,
ModelMBeanOperationInfo 에 기술자가
관련지을 수 있지 않은 경우, 또는 관리 대상의 자원이
null 의 경우InvalidTargetObjectTypeException
. targetType
필드의 값이 objectReference 가 아닌 경우ReflectionException
- 취득 메소드의 호출시에 throw 된다
Exception
를 랩 한다
RuntimeOperationsException
- IllegalArgumentException
를
랩 한다. 파라미터내의 속성명이
null 의 경우setAttribute(javax.management.Attribute)
public AttributeList getAttributes(String [] attrNames)
DynamicMBean
내의 getAttributes
attrNames
- 취득되는 속성의 이름으로부터 완성된다
String 배열
RuntimeOperationsException
- IllegalArgumentException
를
랩 한다. 즉, 파라미터내의 객체명이 null 인지,
파라미터내의 속성이 nullsetAttributes(javax.management.AttributeList)
public void setAttribute(Attribute attribute) throws AttributeNotFoundException , InvalidAttributeValueException , MBeanException , ReflectionException
currencyTimeLimit 가 > 0 의 경우, 속성의 새로운 값이 속성 기술자의 value 필드에 캐쉬되어 lastUpdatedTimeStamp 필드에 현재의 타임 스탬프가 설정됩니다.
속성의 기술자의 지속 필드가 null 이외의 경우, 지속 스토어내에 속성을 포함하기 위해(때문에), 속성 기술자의 Persistance 정책가 사용됩니다.
persistPolicy 필드가 다음의 내용이 되어 있는 경우, MBean 가 포함됩니다.
Model MBean 의 ModelMBeanInfo 는 파일에 포함됩니다.
DynamicMBean
내의 setAttribute
attribute
- 설정되는 속성의 이름과
설정치를 포함한 Attribute 인스턴스
AttributeNotFoundException
- 지정의 속성이 MBean 에
액세스 할 수 없는 경우
InvalidAttributeValueException
- 지정의 속성에 기술자가
정의되어 있지 않은 경우
MBeanException
- 다음의 몇개의 Exception 를 랩 한다:
ServiceNotFoundException
. 속성의 기술자에게
setMethod 필드가 정의되지 않고, 관리 대상의
자원이 null 의 경우. 또는 setMethod 필드가 정의되지 않고,
속성으로 캐쉬가 유효하게 되지 않은 경우.
getMethod 필드도 존재하지 않는 경우는,
캐쉬가 자동적으로 유효하게 된다InvalidTargetObjectTypeException
. targetType
필드의 값이 objectReference 가 아닌 경우ReflectionException
- 설정 메소드의 호출시에 throw 된다
Exception
를 랩 한다
RuntimeOperationsException
- IllegalArgumentException
를
랩 한다. 파라미터내의 속성이
null 의 경우getAttribute(java.lang.String)
public AttributeList setAttributes(AttributeList attributes)
DynamicMBean
내의 setAttributes
attributes
- 속성의 리스트. (설정되는 속성의 ID 와
설정되는 값)
RuntimeOperationsException
- IllegalArgumentException
를
랩 한다. 즉, 파라미터내의 객체명이 null 인지,
파라미터내의 속성이 nullgetAttributes(java.lang.String[])
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
NotificationBroadcaster
내의 addNotificationListener
listener
- 등록이 끝난 MBean 가 발행한 통지를
처리하는 청취자 객체filter
- 필터 객체. null 의 경우,
통지 처리전에 필터는 적용되지 않는handback
- 통지가 발행되었을 때에 통지와 함께
청취자에게 송신되는 문맥
IllegalArgumentException
- 청취자는 null 로 할 수 없는removeNotificationListener(javax.management.NotificationListener)
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
NotificationBroadcaster
내의 removeNotificationListener
listener
- 등록이 끝난 MBean 가 발행했다
통지를 처리하고 있던 청취자의 이름.
이 메소드는 이 청취자에 관한 모든 정보를 삭제한다
ListenerNotFoundException
- 청취자가 MBean 에
등록되지 않은지, null 의 경우addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
NotificationEmitter
의 기술:이 MBean 로부터 청취자를 삭제합니다. MBean 는, 지정된 listener
,filter
, 및 handback
파라미터와 정확하게 일치하는 청취자를 가지고 있을 필요가 있습니다. 해당하는 청취자가 복수 존재하는 경우, 그 중의 1 개(살)만이 삭제됩니다.
삭제되는 청취자내에서 null 가 지정되고 있는 경우,filter
및 handback
파라미터는 null 가 됩니다.
NotificationEmitter
내의 removeNotificationListener
listener
- 이전에 이 MBean 에 추가되었다
청취자filter
- 청취자의 추가시로 지정되었다
필터handback
- 청취자의 추가시로 지정되었다
핸드백
ListenerNotFoundException
- 청취자가 MBean 에
등록되지 않은 경우, 또는 지정된 필터 및 핸드백으로
등록되지 않은 경우public void sendNotification(Notification ntfyObj) throws MBeanException , RuntimeOperationsException
ModelMBeanNotificationBroadcaster
의 기술:
ModelMBeanNotificationBroadcaster
내의 sendNotification
ntfyObj
- 청취자 객체의
handleNotification 메소드에게 건네지는 통지
MBeanException
- 분산 통신 Exception 를 랩 한다
RuntimeOperationsException
- IllegalArgumentException 를 랩 한다.
파라미터로서 건네받은 Notification 객체가 null 의 경우public void sendNotification(String ntfyText) throws MBeanException , RuntimeOperationsException
ModelMBeanNotificationBroadcaster
의 기술:
ModelMBeanNotificationBroadcaster
내의 sendNotification
ntfyText
- Notification 로 지정되어
청취자 객체의 handleNotification 메소드에게 건네지는 텍스트.
구축 끝난 Notification 를 다음에 나타냅니다.
type "jmx.modelmbean.generic"
source 이 ModelMBean 인스턴스
sequence 1
MBeanException
- 분산 통신 Exception 를 랩 한다
RuntimeOperationsException
- IllegalArgumentException 를 랩 한다.
파라미터로서 건네받은 Notification 텍스트 캐릭터 라인이 null 의 경우public MBeanNotificationInfo [] getNotificationInfo()
RequiredModelMBean 는, 2 개의 추가 통지를 송신하는 경우가 있습니다.
"name=GENERIC, descriptorType=notification, log=T, severity=6, displayName=jmx.modelmbean.generic"
를 가지는 통지"name=ATTRIBUTE_CHANGE, descriptorType=notification, log=T, severity=6, displayName=jmx.attribute.change"
를 가지는 표준 속성 변경 통지
NotificationBroadcaster
내의 getNotificationInfo
public void addAttributeChangeNotificationListener(NotificationListener inlistener, String inAttributeName, Object inhandback) throws MBeanException , RuntimeOperationsException , IllegalArgumentException
ModelMBeanNotificationBroadcaster
의 기술:
ModelMBeanNotificationBroadcaster
내의 addAttributeChangeNotificationListener
inlistener
- 등록이 끝난 MBean 가 발행한 통지를 처리하는 청취자 객체inAttributeName
- ModelMBean 속성의 이름. 이 속성의 변경 통지를 수신한다.
null 의 경우, 어느 속성이 변경되었을 때도 attributeChangeNotification 가 발행되는inhandback
- 통지가 발행되었을 때 통지와 함께 청취자에게 송신되는 문맥
MBeanException
- 분산 통신 Exception 를 랩 한다
RuntimeOperationsException
- IllegalArgumentException 를 랩 한다. 파라미터로서 건네받는 속성명이 존재하지 않는 경우
IllegalArgumentException
- 청취자는 null 로 할 수 없는ModelMBeanNotificationBroadcaster.removeAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String)
public void removeAttributeChangeNotificationListener(NotificationListener inlistener, String inAttributeName) throws MBeanException , RuntimeOperationsException , ListenerNotFoundException
ModelMBeanNotificationBroadcaster
의 기술:
ModelMBeanNotificationBroadcaster
내의 removeAttributeChangeNotificationListener
inlistener
- 등록이 끝난 MBean 가 발행한 통지를 처리하고 있던 청취자의 이름.
이 메소드는 이 청취자에 관한 모든 정보를 삭제하는inAttributeName
- 속성. 청취자는, 이 속성의 attributeChangeNotification 를 수신할 필요가 없어졌다.
null 의 경우, 모든 attributeChangeNotification 의 청취자가 삭제된다
MBeanException
- 분산 통신 Exception 를 랩 한다
RuntimeOperationsException
- inAttributeName 파라미터가 속성명에 일치하지 않는 경우,
IllegalArgumentException 를 랩 한다.
ListenerNotFoundException
- 청취자가 MBean 에 등록되지 않은지, null 의 경우ModelMBeanNotificationBroadcaster.addAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String, java.lang.Object)
public void sendAttributeChangeNotification(AttributeChangeNotification ntfyObj) throws MBeanException , RuntimeOperationsException
ModelMBeanNotificationBroadcaster
의 기술:
ModelMBeanNotificationBroadcaster
내의 sendAttributeChangeNotification
ntfyObj
- 청취자 객체의
handleNotification 메소드에게 건네지는 통지
MBeanException
- 분산 통신 Exception 를 랩 한다
RuntimeOperationsException
- IllegalArgumentException 를 랩 한다. 파라미터로서 건네받은 AttributeChangeNotification 객체가 null 의 경우public void sendAttributeChangeNotification(Attribute inOldVal, Attribute inNewVal) throws MBeanException , RuntimeOperationsException
ModelMBeanNotificationBroadcaster
의 기술:
ModelMBeanNotificationBroadcaster
내의 sendAttributeChangeNotification
inOldVal
- Attribute 의 초기치inNewVal
- 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 객체가 복수 지정되었을 경우protected ClassLoaderRepository getClassLoaderRepository()
ClassLoaderRepository
를 돌려주기 (위해)때문에, 이 메소드를 재정의할 수가 있습니다.
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
RequireModelMBean 가 실행시에 적절히 기능하도록(듯이), 이 메소드를 overload 또는 오버라이드(override) 하는 RequiredModelMBean 의 서브 클래스는, 고유의 preRegister
구현내의 super.preRegister(server, name)
를 호출할 필요가 있습니다.
MBeanRegistration
내의 preRegister
server
- MBean 서버. MBean 는 여기에 등록되는name
- MBean 의 객체명MBeanServer
인터페이스내의
createMBean
또는
registerMBean
메소드의 name 파라미터가 null 의 경우,
이 이름은 null 가 된다. 이 경우, 이 메소드는,
새로운 MBean 용으로 null 이외의 ObjectName 를 반드시 돌려준다
name
파라미터가 null 이외의 경우, 일반적으로은 값이 돌려주어지지만,
이것은 필수는 아니다
Exception
- 이 예외는, MBean 서버에 캐치 되어
MBeanRegistrationException
(으)로서 재throw 된다public void postRegister(Boolean registrationDone)
RequireModelMBean 가 실행시에 적절히 기능하도록(듯이), 이 메소드를 overload 또는 오버라이드(override) 하는 RequiredModelMBean 의 서브 클래스는, 고유의 postRegister
구현내의 super.postRegister(registrationDone)
를 호출할 필요가 있습니다.
MBeanRegistration
내의 postRegister
registrationDone
- MBean 가 MBean 서버에
정상적으로 등록되었는지의 여부를 나타낸다. 등록에
실패했을 경우의 값은 falsepublic void preDeregister() throws Exception
RequireModelMBean 가 실행시에 적절히 기능하도록(듯이), 이 메소드를 overload 또는 오버라이드(override) 하는 RequiredModelMBean 의 서브 클래스는, 고유의 preDeregister
구현내의 super.preDeregister()
를 호출할 필요가 있습니다.
MBeanRegistration
내의 preDeregister
Exception
- 이 예외는, MBean 서버에 캐치 되어
MBeanRegistrationException
(으)로서 재throw 된다public void postDeregister()
RequireModelMBean 가 실행시에 적절히 기능하도록(듯이), 이 메소드를 overload 또는 오버라이드(override) 하는 RequiredModelMBean 의 서브 클래스는, 고유의 postDeregister
구현내의 super.postDeregister()
를 호출할 필요가 있습니다.
MBeanRegistration
내의 postDeregister
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.