JavaTM Platform
Standard Ed. 6

javax.management.modelmbean
클래스 RequiredModelMBean

java.lang.Object 
  상위를 확장 javax.management.modelmbean.RequiredModelMBean
모든 구현된 인터페이스:
DynamicMBean , MBeanRegistration , ModelMBean , ModelMBeanNotificationBroadcaster , NotificationBroadcaster , NotificationEmitter , PersistentMBean


public class RequiredModelMBean
extends Object
implements ModelMBean , MBeanRegistration , NotificationEmitter

이 클래스는, 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 등)으로부터의 예외의 랩이 가능하게 됩니다.

도입된 버젼:
1.5

생성자 의 개요
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
 

생성자 의 상세

RequiredModelMBean

public RequiredModelMBean()
                   throws MBeanException ,
                          RuntimeOperationsException 
빈 상태(empty)의 ModelMBeanInfo 으로 RequiredModelMBean 를 구축합니다.

RequiredModelMBean 의 MBeanInfo 및 Descriptor 은,setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) 메소드로 커스터마이즈 할 수 있습니다. RequiredModelMBean 의 MBeanInfo 및 Descriptor 의 커스터마이즈 후, RequiredModelMBean 를 MBeanServer 에 등록할 수가 있습니다.

예외:
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - 객체의 구축시에 RuntimeException 를 랩 한다

RequiredModelMBean

public RequiredModelMBean(ModelMBeanInfo  mbi)
                   throws MBeanException ,
                          RuntimeOperationsException 
건네받은 ModelMBeanInfo 을 사용해 RequiredModelMBean 객체를 구축합니다. RequiredModelMBean 가 아직 MBeanServer 에 등록되지 않은 경우에 한정해,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 의 경우
메소드의 상세

setModelMBeanInfo

public void setModelMBeanInfo(ModelMBeanInfo  mbi)
                       throws MBeanException ,
                              RuntimeOperationsException 
ModelMBeanInfo 를 사용해 ModelMBean 객체를 초기화합니다. 이 메소드를 사용하면(자), ModelMBean 상에, MBeanServer 에 등록되지 않은 커스텀 ModelMBeanInfo 를 설정할 수 있습니다.
ModelMBean 의 ModelMBeanInfo (Descriptor 첨부)를 커스터마이즈 해, ModelMBean 로 설정한 뒤, ModelMBean 를 MBeanServer 에 등록할 수가 있습니다.

ModelMBean 가 현재 등록되어 있는 경우, 이 메소드는 IllegalStateException 를 랩 하는 RuntimeOperationsException 를 throw 합니다.

지정의 inModelMBeanInfoGENERIC 또는 ATTRIBUTE_CHANGE 통지 ModelMBeanNotificationInfo 가 포함되지 않는 경우, RequiredModelMBean 에 의해, 디폴트 ModelMBeanNotificationInfo 가 제공됩니다.

정의:
인터페이스 ModelMBean 내의 setModelMBeanInfo
파라미터:
mbi - ModelMBean 에 의해 사용된다 ModelMBeanInfo 객체
예외:
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException -

setManagedResource

public void setManagedResource(Object  mr,
                               String  mr_type)
                        throws MBeanException ,
                               RuntimeOperationsException ,
                               InstanceNotFoundException ,
                               InvalidTargetObjectTypeException 
이 ModelMBean 관리 인터페이스내의 모든 메소드 (MBeanInfo 와 Descriptor)의 실행 대상이 되는, 객체의 인스턴스 핸들을 설정합니다.

정의:
인터페이스 ModelMBean 내의 setManagedResource
파라미터:
mr - 관리 대상의 자원이 되어 있는 객체
mr_type - 관리 대상의 자원의 참조의 형태
ObjectReference, Handle, IOR, EJBHandle, 또는 RMIReference
이 구현으로 지원되는 것은 ObjectReference 마셔
예외:
MBeanException - 객체의 이니샤라이자가 예외를 throw 했을 경우
InstanceNotFoundException - 관리 대상의 자원 객체가 발견되지 않는 경우
InvalidTargetObjectTypeException - 관리 대상의 자원의 형태는 ObjectReference 가 아니면 안된다
RuntimeOperationsException - 자원의 설정시에 RuntimeException 를 랩 한다

load

public void load()
          throws MBeanException ,
                 RuntimeOperationsException ,
                 InstanceNotFoundException 

이 MBean 인스턴스를 지속 스토어내의 MBean 용 데이터로 인스턴스화합니다. 데이터로서 속성과 오퍼레이션의 값을 로드할 수 있습니다.

이 메소드는, 이 인스턴스의 구축 또는 초기화시, MBean 를 MBeanServer 에 등록하기 전에 호출합니다.

이 클래스의 구현이 지속성을 지원하지 않는 경우,ServiceNotFoundException 를 랩 하는 MBeanException 가 throw 됩니다.

정의:
인터페이스 PersistentMBean 내의 load
예외:
MBeanException - 그 외의 예외를 랩 하는 경우, 또는 지속성이 지원되지 않는 경우
RuntimeOperationsException - 지속 기구로부터의 예외를 랩 하는 경우
InstanceNotFoundException - 이 MBean 가 발견되지 않는 경우, 또는 지속 스토리지로부터 로드할 수 없는 경우

store

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 - 지속 스토어가 발견되지 않는 경우, 또는 액세스 할 수 없는 경우

getMBeanInfo

public MBeanInfo  getMBeanInfo()
이 RequiredModelMBean 가 관리용으로서 공개하는 속성, 오퍼레이션, 생성자 , 및 통지를 돌려줍니다.

정의:
인터페이스 DynamicMBean 내의 getMBeanInfo
반환값:
ModelMBeanInfo 의 인스턴스. 이 MBean 의 모든 속성, 오퍼레이션, 및 통지의 취득을 허가한다

invoke

public Object  invoke(String  opName,
                     Object [] opArgs,
                     String [] sig)
              throws MBeanException ,
                     ReflectionException 
RequiredModelMBean 로부터 메소드를 호출해, 그 실행 결과를 돌려줍니다.

불려 가는 메소드와 시그니챠가 RequiredModelMbean 로부터 액세스 가능한 메소드의 어느 쪽인가에 일치하고 있는 경우, 이 메소드가 불려 갑니다. 그 이외의 경우, 관리 대상의 자원상에서, 지정의 메소드의 호출이 시행됩니다.

오퍼레이션에 의해 반환되는 마지막 값은, ModelMBeanOperationInfo 의 기술자내의 오퍼레이션 기술자에게 캐쉬되는 일이 있습니다. 유효한 값이 존재하는 경우, value 필드내에 존재합니다. 값이 캐쉬될지 어떨지는, 기술자내의 currencyTimeLimit 필드의 값에 의해 정해집니다.

주: 이전의 버젼의 스펙과의 부정합이 있기 (위해)때문에,currencyTimeLimit 에는 제로 이하의 값을 사용하지 않게 해 주세요. 캐쉬에 들어간 값이 유효하지 않은 것을 나타내는 경우는,currencyTimeLimit 필드를 생략 합니다. 이 값이 항상 유효한 것을 나타내는 경우는, 이 필드에 매우 큰 값을 지정합니다.

정의:
인터페이스 DynamicMBean 내의 invoke
파라미터:
opName - 불려 가는 메소드의 이름. 클래스명을 포함한 완전 수식 메소드명. 오퍼레이션 기술자의 class 필드에 클래스명이 정의되고 있는 경우는 메소드명만
opArgs - 오퍼레이션의 호출시로 설정된다 파라미터를 포함한 배열
sig - 오퍼레이션의 시그니챠를 포함한 배열. 클래스 객체의 로드에는, 오퍼레이션을 호출한 MBean 를 로드할 때와 같은 클래스 로더가 사용된다
반환값:
메소드에 의해 반환되는 객체. 지정된 관리 대상의 자원상에서 메소드를 호출한 결과를 나타낸다
예외:
MBeanException - 다음의 몇개의 Exception 를 랩 한다:
  • 관리 대상 객체의 호출 메소드에 의해 throw 된 Exception
  • ServiceNotFoundException . ModelMBeanOperationInfo 가 존재하지 않는 경우, 지정의 오퍼레이션의 기술자가 정의되어 있지 않은 경우, 또는 관리 대상의 자원이 null 의 경우
  • InvalidTargetObjectTypeException . targetType 필드의 값이 objectReference 가 아닌 경우
ReflectionException - 메소드의 호출시에 throw 된다 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 (을)를 랩 한다. 메소드명이 null 의 경우

getAttribute

public Object  getAttribute(String  attrName)
                    throws AttributeNotFoundException ,
                           MBeanException ,
                           ReflectionException 
이 ModelMBean 에 정의된 특정의 속성의 값을 돌려줍니다. 속성에 의해 반환되는 마지막 값은, 속성의 기술자내에 캐쉬되는 일이 있습니다. 유효한 값이 존재하는 경우, value 필드내에 존재합니다. 값이 캐쉬될지 어떨지는, 기술자내의 currencyTimeLimit 필드의 값에 의해 정해집니다.

주: 이전의 버젼의 스펙과의 부정합이 있기 (위해)때문에,currencyTimeLimit 에는 제로 이하의 값을 사용하지 않게 해 주세요. 캐쉬에 들어간 값이 유효하지 않은 것을 나타내는 경우는,currencyTimeLimit 필드를 생략 합니다. 이 값이 항상 유효한 것을 나타내는 경우는, 이 필드에 매우 큰 값을 지정합니다.

getMethod 필드에 유효한 오퍼레이션 기술자의 이름이 포함되는 경우, 이 오퍼레이션 기술자에 의해 기술된 메소드가 실행됩니다. 메소드는, 응답으로서 속성치를 돌려줍니다. 오퍼레이션이 실패했을 경우, 또는 반환값의 형태가 속성의 선언형과 호환성이 없는 경우, 예외가 throw 됩니다.

getMethod 필드가 정의되어 있지 않은 경우, 속성의 디폴트 값가 돌려주어집니다. 반환값의 형태가 속성의 선언형과 호환성이 없는 경우, 예외가 throw 됩니다.

속성의 선언형은,MBeanAttributeInfo.getType() 에 의해 반환되는 String 입니다. 다음중 한쪽이 들어맞는 경우, 값은 이 형태와 호환성이 있습니다.

이 구현으로, getMethod 를 호출할 필요가 있는 경우는, 호출이 정상적으로 행해지도록(듯이), 이 getMethod 에 대해서 오퍼레이션을 지정할 필요가 있습니다. 이것은, 메소드가 표준의 호출 메소드로부터 불려 가 operationInfo 가 필요하게 되기 때문입니다.

정의:
인터페이스 DynamicMBean 내의 getAttribute
파라미터:
attrName - 취득하는 속성의 이름을 지정하는 StringModelMBeanAttributeInfo 의 이름에 일치하고 있을 필요가 있다
반환값:
기술자의 value 필드로부터 취득한 속성의 값. 또는, 기술자의 getMethod 필드내의 오퍼레이션의 호출에 의해 취득한 속성의 값
예외:
AttributeNotFoundException - 지정의 속성이 MBean 에 액세스 할 수 없는 경우. 다음의 경우, AttributeNotFoundException 가 throw 될 가능성이 있다
  • ModelMBean 의 ModelMBeanInfo 가 발견되지 않는 경우
  • 지정의 속성명의 ModelMBeanAttributeInfo 가 발견되지 않는 경우
  • ModelMBeanAttributeInfo 의 isReadable 메소드의 반환값이 false 의 경우
MBeanException - 다음의 몇개의 Exception 를 랩 한다:
  • InvalidAttributeValueException . 속성의 취득 메소드로부터 받은 값의 형태가 부정한 경우, 또는 속성의 기술자내에 getMethod 필드가 정의되지 않고, 디폴트 값가 존재하지 않는 경우
  • ServiceNotFoundException . 속성의 취득 메소드에 대해서 ModelMBeanOperationInfo 가 정의되어 있지 않은 경우, ModelMBeanOperationInfo 에 기술자가 관련지을 수 있지 않은 경우, 또는 관리 대상의 자원이 null 의 경우
  • InvalidTargetObjectTypeException . targetType 필드의 값이 objectReference 가 아닌 경우
  • 관리 대상 객체의 취득 메소드에 의해 throw 된 Exception
ReflectionException - 취득 메소드의 호출시에 throw 된다 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터내의 속성명이 null 의 경우
관련 항목:
setAttribute(javax.management.Attribute)

getAttributes

public AttributeList  getAttributes(String [] attrNames)
ModelMBean 내의 복수의 속성의 값을 돌려줍니다. 건네받는 attrNames 배열내의 속성명 마다 getAttribute 를 실행합니다.

정의:
인터페이스 DynamicMBean 내의 getAttributes
파라미터:
attrNames - 취득되는 속성의 이름으로부터 완성된다 String 배열
반환값:
취득되는 속성의 배열
예외:
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 즉, 파라미터내의 객체명이 null 인지, 파라미터내의 속성이 null
관련 항목:
setAttributes(javax.management.AttributeList)

setAttribute

public void setAttribute(Attribute  attribute)
                  throws AttributeNotFoundException ,
                         InvalidAttributeValueException ,
                         MBeanException ,
                         ReflectionException 
지정의 ModelMBean 의 특정의 속성의 값을 설정합니다. 속성의 기술자의 setMethod 필드에 유효한 오퍼레이션 기술자의 이름이 포함되는 경우, 이 오퍼레이션 기술자에 의해 기술된 메소드가 실행됩니다. 이 구현에서는, setMethod 를 정상적으로 동작시키기 (위해)때문에, 오퍼레이션 기술자를 올바르게 지정해, modelMBeanInfo 에 할당할 필요가 있습니다. 메소드로부터의 응답 내용은, 기술자내의 속성의 값으로 해서 설정됩니다.

currencyTimeLimit 가 > 0 의 경우, 속성의 새로운 값이 속성 기술자의 value 필드에 캐쉬되어 lastUpdatedTimeStamp 필드에 현재의 타임 스탬프가 설정됩니다.

속성의 기술자의 지속 필드가 null 이외의 경우, 지속 스토어내에 속성을 포함하기 위해(때문에), 속성 기술자의 Persistance 정책가 사용됩니다.
persistPolicy 필드가 다음의 내용이 되어 있는 경우, MBean 가 포함됩니다.

persistPolicy 필드가 다음의 내용이 되어 있는 경우, MBean 는 포함되지 않습니다.

Model MBean 의 ModelMBeanInfo 는 파일에 포함됩니다.

정의:
인터페이스 DynamicMBean 내의 setAttribute
파라미터:
attribute - 설정되는 속성의 이름과 설정치를 포함한 Attribute 인스턴스
예외:
AttributeNotFoundException - 지정의 속성이 MBean 에 액세스 할 수 없는 경우
다음의 경우, AttributeNotFoundException 가 throw 될 가능성이 있다
  • 지정의 속성의 ModelMBeanAttributeInfo 가 발견되지 않는 경우
  • ModelMBeanAttributeInfo 의 isWritable 메소드의 반환값이 false 의 경우
InvalidAttributeValueException - 지정의 속성에 기술자가 정의되어 있지 않은 경우
MBeanException - 다음의 몇개의 Exception 를 랩 한다:
  • 관리 대상 객체의 설정 메소드에 의해 throw 된 Exception
  • ServiceNotFoundException . 속성의 기술자에게 setMethod 필드가 정의되지 않고, 관리 대상의 자원이 null 의 경우. 또는 setMethod 필드가 정의되지 않고, 속성으로 캐쉬가 유효하게 되지 않은 경우. getMethod 필드도 존재하지 않는 경우는, 캐쉬가 자동적으로 유효하게 된다
  • InvalidTargetObjectTypeException . targetType 필드의 값이 objectReference 가 아닌 경우
  • 관리 대상 객체의 취득 메소드에 의해 throw 된 Exception
ReflectionException - 설정 메소드의 호출시에 throw 된다 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터내의 속성이 null 의 경우
관련 항목:
getAttribute(java.lang.String)

setAttributes

public AttributeList  setAttributes(AttributeList  attributes)
이 ModelMBean 의 속성의 배열의 값을 설정합니다. 리스트내의 각 속성에 대해서 setAttribute() 메소드를 실행합니다.

정의:
인터페이스 DynamicMBean 내의 setAttributes
파라미터:
attributes - 속성의 리스트. (설정되는 속성의 ID 와 설정되는 값)
반환값:
Attribute 인스턴스내의 새로운 값으로 설정된 속성의 배열
예외:
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 즉, 파라미터내의 객체명이 null 인지, 파라미터내의 속성이 null
관련 항목:
getAttributes(java.lang.String[])

addNotificationListener

public void addNotificationListener(NotificationListener  listener,
                                    NotificationFilter  filter,
                                    Object  handback)
                             throws IllegalArgumentException 
NotificationListener 인터페이스를 구현하는 객체를 청취자로서 등록합니다. ModelMBean 에 의해 임의의 통지가 발행되면(자), 이 객체의 handleNotification() 메소드가 불려 갑니다. attributeChangeNotification 는 포함하지 않습니다. 이것들은 개별적으로 등록할 필요가 있습니다.

정의:
인터페이스 NotificationBroadcaster 내의 addNotificationListener
파라미터:
listener - 등록이 끝난 MBean 가 발행한 통지를 처리하는 청취자 객체
filter - 필터 객체. null 의 경우, 통지 처리전에 필터는 적용되지 않는
handback - 통지가 발행되었을 때에 통지와 함께 청취자에게 송신되는 문맥
예외:
IllegalArgumentException - 청취자는 null 로 할 수 없는
관련 항목:
removeNotificationListener(javax.management.NotificationListener)

removeNotificationListener

public void removeNotificationListener(NotificationListener  listener)
                                throws ListenerNotFoundException 
RequiredModelMBean 로부터 Notification 의 청취자를 삭제합니다.

정의:
인터페이스 NotificationBroadcaster 내의 removeNotificationListener
파라미터:
listener - 등록이 끝난 MBean 가 발행했다 통지를 처리하고 있던 청취자의 이름. 이 메소드는 이 청취자에 관한 모든 정보를 삭제한다
예외:
ListenerNotFoundException - 청취자가 MBean 에 등록되지 않은지, null 의 경우
관련 항목:
addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

removeNotificationListener

public void removeNotificationListener(NotificationListener  listener,
                                       NotificationFilter  filter,
                                       Object  handback)
                                throws ListenerNotFoundException 
인터페이스 NotificationEmitter 의 기술:

이 MBean 로부터 청취자를 삭제합니다. MBean 는, 지정된 listener,filter, 및 handback 파라미터와 정확하게 일치하는 청취자를 가지고 있을 필요가 있습니다. 해당하는 청취자가 복수 존재하는 경우, 그 중의 1 개(살)만이 삭제됩니다.

삭제되는 청취자내에서 null 가 지정되고 있는 경우,filterhandback 파라미터는 null 가 됩니다.

정의:
인터페이스 NotificationEmitter 내의 removeNotificationListener
파라미터:
listener - 이전에 이 MBean 에 추가되었다 청취자
filter - 청취자의 추가시로 지정되었다 필터
handback - 청취자의 추가시로 지정되었다 핸드백
예외:
ListenerNotFoundException - 청취자가 MBean 에 등록되지 않은 경우, 또는 지정된 필터 및 핸드백으로 등록되지 않은 경우

sendNotification

public void sendNotification(Notification  ntfyObj)
                      throws MBeanException ,
                             RuntimeOperationsException 
인터페이스 ModelMBeanNotificationBroadcaster 의 기술:
ModelMBean 상의 등록이 끝난 Notification 청취자에게, jmx.modelmbean.generic 통지로서 건네받는 Notification 를 송신합니다.

정의:
인터페이스 ModelMBeanNotificationBroadcaster 내의 sendNotification
파라미터:
ntfyObj - 청취자 객체의 handleNotification 메소드에게 건네지는 통지
예외:
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터로서 건네받은 Notification 객체가 null 의 경우

sendNotification

public void sendNotification(String  ntfyText)
                      throws MBeanException ,
                             RuntimeOperationsException 
인터페이스 ModelMBeanNotificationBroadcaster 의 기술:
ModelMBean 상의 등록이 끝난 Notification 청취자에게 건네지는 텍스트 캐릭터 라인을 포함한 Notification 를 송신합니다.

정의:
인터페이스 ModelMBeanNotificationBroadcaster 내의 sendNotification
파라미터:
ntfyText - Notification 로 지정되어 청취자 객체의 handleNotification 메소드에게 건네지는 텍스트. 구축 끝난 Notification 를 다음에 나타냅니다. type "jmx.modelmbean.generic" source 이 ModelMBean 인스턴스 sequence 1
예외:
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터로서 건네받은 Notification 텍스트 캐릭터 라인이 null 의 경우

getNotificationInfo

public MBeanNotificationInfo [] getNotificationInfo()
RequiredModelMBean 에 의해 생성된 Notification 의 배열을 돌려줍니다.

RequiredModelMBean 는, 2 개의 추가 통지를 송신하는 경우가 있습니다.

이러한 2 개의 통지는, 어플리케이션에 의해 지정된 통지에 항상 추가됩니다.

정의:
인터페이스 NotificationBroadcaster 내의 getNotificationInfo
반환값:
MBeanNotificationInfo[]

addAttributeChangeNotificationListener

public void addAttributeChangeNotificationListener(NotificationListener  inlistener,
                                                   String  inAttributeName,
                                                   Object  inhandback)
                                            throws MBeanException ,
                                                   RuntimeOperationsException ,
                                                   IllegalArgumentException 
인터페이스 ModelMBeanNotificationBroadcaster 의 기술:
NotificationListener 인터페이스를 구현하는 객체를 청취자로서 등록합니다. ModelMBean 에 의해 임의의 attributeChangeNotification 가 발행되면(자), 이 객체의 handleNotification() 메소드가 불려 갑니다. 그 외의 Notification 는 포함하지 않습니다. 이것들은 개별적으로 등록할 필요가 있습니다. 이 attributeName 용의 AttributeChangeNotification 가 생성됩니다.

정의:
인터페이스 ModelMBeanNotificationBroadcaster 내의 addAttributeChangeNotificationListener
파라미터:
inlistener - 등록이 끝난 MBean 가 발행한 통지를 처리하는 청취자 객체
inAttributeName - ModelMBean 속성의 이름. 이 속성의 변경 통지를 수신한다. null 의 경우, 어느 속성이 변경되었을 때도 attributeChangeNotification 가 발행되는
inhandback - 통지가 발행되었을 때 통지와 함께 청취자에게 송신되는 문맥
예외:
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터로서 건네받는 속성명이 존재하지 않는 경우
IllegalArgumentException - 청취자는 null 로 할 수 없는
관련 항목:
ModelMBeanNotificationBroadcaster.removeAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String)

removeAttributeChangeNotificationListener

public void removeAttributeChangeNotificationListener(NotificationListener  inlistener,
                                                      String  inAttributeName)
                                               throws MBeanException ,
                                                      RuntimeOperationsException ,
                                                      ListenerNotFoundException 
인터페이스 ModelMBeanNotificationBroadcaster 의 기술:
RequiredModelMBean 로부터 attributeChangeNotification 의 청취자를 삭제합니다.

정의:
인터페이스 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)

sendAttributeChangeNotification

public void sendAttributeChangeNotification(AttributeChangeNotification  ntfyObj)
                                     throws MBeanException ,
                                            RuntimeOperationsException 
인터페이스 ModelMBeanNotificationBroadcaster 의 기술:
ModelMBean 상의 등록이 끝난 attributeChangeNotification 청취자에게 건네지는 attributeChangeNotification 를 송신합니다.

정의:
인터페이스 ModelMBeanNotificationBroadcaster 내의 sendAttributeChangeNotification
파라미터:
ntfyObj - 청취자 객체의 handleNotification 메소드에게 건네지는 통지
예외:
MBeanException - 분산 통신 Exception 를 랩 한다
RuntimeOperationsException - IllegalArgumentException 를 랩 한다. 파라미터로서 건네받은 AttributeChangeNotification 객체가 null 의 경우

sendAttributeChangeNotification

public void sendAttributeChangeNotification(Attribute  inOldVal,
                                            Attribute  inNewVal)
                                     throws MBeanException ,
                                            RuntimeOperationsException 
인터페이스 ModelMBeanNotificationBroadcaster 의 기술:
ModelMBean 상의 등록이 끝난 AttributeChangeNotification 청취자에게, 속성의 낡은 값과 새로운 값을 포함한 attributeChangeNotification 를 송신합니다.

정의:
인터페이스 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 객체가 복수 지정되었을 경우

getClassLoaderRepository

protected ClassLoaderRepository  getClassLoaderRepository()
클래스의 로드에 사용된 클래스 로더 리포지터리(repository)를 돌려줍니다. 서브 클래스는, 이 객체내에서 사용하는 적절한 ClassLoaderRepository 를 돌려주기 (위해)때문에, 이 메소드를 재정의할 수가 있습니다.

반환값:
클래스 로더 리포지터리(repository)

preRegister

public ObjectName  preRegister(MBeanServer  server,
                              ObjectName  name)
                       throws Exception 
MBean 서버에 등록하기 전에, MBean 에 필요한 오퍼레이션을 실행시킬 수가 있습니다. MBean 의 이름을 지정하지 않으면 MBean 에 의해, 등록용의 이름이 제공됩니다. 예외가 throw 되었을 경우, MBean 는 MBean 서버에 등록되지 않습니다.

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 를 반드시 돌려준다
반환값:
MBean 의 등록명. null 는 지정할 수 없다. name 파라미터가 null 이외의 경우, 일반적으로은 값이 돌려주어지지만, 이것은 필수는 아니다
예외:
Exception - 이 예외는, MBean 서버에 캐치 되어 MBeanRegistrationException (으)로서 재throw 된다

postRegister

public void postRegister(Boolean  registrationDone)
MBean 서버에의 등록이 성공 또는 실패한 뒤, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다.

RequireModelMBean 가 실행시에 적절히 기능하도록(듯이), 이 메소드를 overload 또는 오버라이드(override) 하는 RequiredModelMBean 의 서브 클래스는, 고유의 postRegister 구현내의 super.postRegister(registrationDone) 를 호출할 필요가 있습니다.

정의:
인터페이스 MBeanRegistration 내의 postRegister
파라미터:
registrationDone - MBean 가 MBean 서버에 정상적으로 등록되었는지의 여부를 나타낸다. 등록에 실패했을 경우의 값은 false

preDeregister

public void preDeregister()
                   throws Exception 
MBean 서버로부터 등록 해제하기 전에, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다.

RequireModelMBean 가 실행시에 적절히 기능하도록(듯이), 이 메소드를 overload 또는 오버라이드(override) 하는 RequiredModelMBean 의 서브 클래스는, 고유의 preDeregister 구현내의 super.preDeregister() 를 호출할 필요가 있습니다.

정의:
인터페이스 MBeanRegistration 내의 preDeregister
예외:
Exception - 이 예외는, MBean 서버에 캐치 되어 MBeanRegistrationException (으)로서 재throw 된다

postDeregister

public void postDeregister()
MBean 서버로부터 등록 해제한 뒤, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다.

RequireModelMBean 가 실행시에 적절히 기능하도록(듯이), 이 메소드를 overload 또는 오버라이드(override) 하는 RequiredModelMBean 의 서브 클래스는, 고유의 postDeregister 구현내의 super.postDeregister() 를 호출할 필요가 있습니다.

정의:
인터페이스 MBeanRegistration 내의 postDeregister

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.