JavaTM Platform
Standard Ed. 6

javax.management
클래스 JMX

java.lang.Object 
  상위를 확장 javax.management.JMX


public class JMX
extends Object

JMX API 로부터의 static 메소드입니다. 이 클래스의 인스턴스는 존재하지 않습니다.

도입된 버젼:
1.6

필드의 개요
static String DEFAULT_VALUE_FIELD
          defaultValue 필드의 이름입니다.
static String IMMUTABLE_INFO_FIELD
          immutableInfo 필드의 이름입니다.
static String INTERFACE_CLASS_NAME_FIELD
          interfaceClassName 필드의 이름입니다.
static String LEGAL_VALUES_FIELD
          legalValues 필드의 이름입니다.
static String MAX_VALUE_FIELD
          maxValue 필드의 이름입니다.
static String MIN_VALUE_FIELD
          minValue 필드의 이름입니다.
static String MXBEAN_FIELD
          mxbean 필드의 이름입니다.
static String OPEN_TYPE_FIELD
          openType 필드의 이름입니다.
static String ORIGINAL_TYPE_FIELD
          originalType 필드의 이름입니다.
 
메소드의 개요
static boolean isMXBeanInterface (Class <? > interfaceClass)
          인터페이스가 MXBean 인터페이스인가 어떤가를 테스트합니다.
static
<T> T
newMBeanProxy (MBeanServerConnection  connection, ObjectName  objectName, Class <T> interfaceClass)
          로컬 또는 원격의 MBean Server 내에 Standard MBean 의 프록시를 작성합니다.
static
<T> T
newMBeanProxy (MBeanServerConnection  connection, ObjectName  objectName, Class <T> interfaceClass, boolean notificationBroadcaster)
          로컬 또는 원격의 MBean Server 내에 Standard MBean 용의 프록시를 작성합니다.
static
<T> T
newMXBeanProxy (MBeanServerConnection  connection, ObjectName  objectName, Class <T> interfaceClass)
          로컬 또는 원격의 MBean Server 내에 MXBean 의 프록시를 작성합니다.
static
<T> T
newMXBeanProxy (MBeanServerConnection  connection, ObjectName  objectName, Class <T> interfaceClass, boolean notificationBroadcaster)
          로컬 또는 원격의 MBean Server 내에 MXBean 용의 프록시를 작성합니다.
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
 

필드의 상세

DEFAULT_VALUE_FIELD

public static final String  DEFAULT_VALUE_FIELD
defaultValue 필드의 이름입니다.

관련 항목:
정수 필드치

IMMUTABLE_INFO_FIELD

public static final String  IMMUTABLE_INFO_FIELD
immutableInfo 필드의 이름입니다.

관련 항목:
정수 필드치

INTERFACE_CLASS_NAME_FIELD

public static final String  INTERFACE_CLASS_NAME_FIELD
interfaceClassName 필드의 이름입니다.

관련 항목:
정수 필드치

LEGAL_VALUES_FIELD

public static final String  LEGAL_VALUES_FIELD
legalValues 필드의 이름입니다.

관련 항목:
정수 필드치

MAX_VALUE_FIELD

public static final String  MAX_VALUE_FIELD
maxValue 필드의 이름입니다.

관련 항목:
정수 필드치

MIN_VALUE_FIELD

public static final String  MIN_VALUE_FIELD
minValue 필드의 이름입니다.

관련 항목:
정수 필드치

MXBEAN_FIELD

public static final String  MXBEAN_FIELD
mxbean 필드의 이름입니다.

관련 항목:
정수 필드치

OPEN_TYPE_FIELD

public static final String  OPEN_TYPE_FIELD
openType 필드의 이름입니다.

관련 항목:
정수 필드치

ORIGINAL_TYPE_FIELD

public static final String  ORIGINAL_TYPE_FIELD
originalType 필드의 이름입니다.

관련 항목:
정수 필드치
메소드의 상세

newMBeanProxy

public static <T> T newMBeanProxy(MBeanServerConnection  connection,
                                  ObjectName  objectName,
                                  Class <T> interfaceClass)

로컬 또는 원격의 MBean Server 내에 Standard MBean 의 프록시를 작성합니다.

MBean Server mbsObjectName name 를 가지는 MBean 가 포함되어 있어, MBean 의 관리 인터페이스가 Java 인터페이스 MyMBean 에 의해 기술되고 있는 경우는, 다음과 같이 해 MBean 의 프록시를 구축할 수 있습니다.

 MyMBean proxy = JMX.newMBeanProxy(mbs, name, MyMBean.class);
 

MyMBean 는, 다음과 같이 됩니다.

 public interface MyMBean {
     public String getSomeAttribute();
     public void setSomeAttribute(String value);
     public void someOperation(String param1, int param2);
 }
 

이것으로, 다음의 내용을 실행할 수 있습니다.

이 메소드에 의해 반환되는 객체는,Proxy 입니다. 이 객체의 InvocationHandlerMBeanServerInvocationHandler 입니다.

이 메소드는,newMBeanProxy(connection, objectName, interfaceClass, false) 와 등가입니다.

형태 파라미터:
T - 예를 들어,interfaceClass 파라미터가 MyMBean.class 이면, 반환값의 형태는 MyMBean 가 되는 것을 컴파일러에 알린다.
파라미터:
connection - 송신지의 MBean 서버
objectName - connection 내에서 건네받는다 MBean 의 이름
interfaceClass - MBean 가 export 한다 관리 인터페이스. 이것도 반환되는 프록시에 의해 구현된다
반환값:
새로운 프록시의 인스턴스

newMBeanProxy

public static <T> T newMBeanProxy(MBeanServerConnection  connection,
                                  ObjectName  objectName,
                                  Class <T> interfaceClass,
                                  boolean notificationBroadcaster)

로컬 또는 원격의 MBean Server 내에 Standard MBean 용의 프록시를 작성합니다. 이것은,NotificationEmitter 의 메소드도 지원하는 경우가 있습니다.

이 메소드의 동작은 newMBeanProxy(MBeanServerConnection, ObjectName, Class) 와 같습니다만, 더해 notificationBroadcastertrue 의 경우, MBean 는 NotificationBroadcaster 또는 NotificationEmitter 이다고 보여져 반환되는 프록시는 NotificationEmitterinterfaceClass 를 구현합니다. 이 프록시상에서 NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) 를 호출하면(자),MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object) 가 불려 갑니다. NotificationBroadcasterNotificationEmitter 의 그 외의 메소드의 경우도 같습니다.

형태 파라미터:
T - 예를 들어,interfaceClass 파라미터가 MyMBean.class 이면, 반환값의 형태는 MyMBean 가 되는 것을 컴파일러에 알린다.
파라미터:
connection - 송신지의 MBean 서버
objectName - connection 내에서 건네받는다 MBean 의 이름
interfaceClass - MBean 가 export 한다 관리 인터페이스. 이것도 반환되는 프록시에 의해 구현되는
notificationBroadcaster - connection 경유로 메소드를 건네주는 것으로, 반환된 프록시에 NotificationEmitter 를 구현시킨다
반환값:
새로운 프록시의 인스턴스

newMXBeanProxy

public static <T> T newMXBeanProxy(MBeanServerConnection  connection,
                                   ObjectName  objectName,
                                   Class <T> interfaceClass)

로컬 또는 원격의 MBean Server 내에 MXBean 의 프록시를 작성합니다.

MBean Server mbsObjectName name 를 가지는 MXBean 가 포함되어 있어, MXBean 의 관리 인터페이스가 Java 인터페이스 MyMXBean 에 의해 기술되고 있는 경우는, 다음과 같이 해 MXBean 의 프록시를 구축할 수 있습니다.

 MyMXBean proxy = JMX.newMXBeanProxy(mbs, name, MyMXBean.class);
 

MyMXBean 는, 다음과 같이 됩니다.

 public interface MyMXBean {
     public String getSimpleAttribute();
     public void setSimpleAttribute(String value);
     public MemoryUsage  getMappedAttribute();
     public void setMappedAttribute(MemoryUsage memoryUsage);
     public MemoryUsage someOperation(String param1, MemoryUsage param2);
 }
 

다음과 같이 됩니다.

이 메소드에 의해 반환되는 객체는,Proxy 입니다. 이 객체의 InvocationHandlerMBeanServerInvocationHandler 입니다.

이 메소드는,newMXBeanProxy(connection, objectName, interfaceClass, false) 와 등가입니다.

형태 파라미터:
T - 예를 들어,interfaceClass 파라미터가 MyMBean.class 이면, 반환값의 형태는 MyMBean 가 되는 것을 컴파일러에 알린다.
파라미터:
connection - 송신지의 MBean 서버
objectName - connection 내에서 건네받는다 MBean 의 이름
interfaceClass - MXBean 인터페이스. 이것도 반환되는 프록시에 의해 구현된다
반환값:
새로운 프록시의 인스턴스

newMXBeanProxy

public static <T> T newMXBeanProxy(MBeanServerConnection  connection,
                                   ObjectName  objectName,
                                   Class <T> interfaceClass,
                                   boolean notificationBroadcaster)

로컬 또는 원격의 MBean Server 내에 MXBean 용의 프록시를 작성합니다. 이것은,NotificationEmitter 의 메소드도 지원하는 경우가 있습니다.

이 메소드의 동작은 newMXBeanProxy(MBeanServerConnection, ObjectName, Class) 와 같습니다만, 더해 notificationBroadcastertrue 의 경우, MXBean 는 NotificationBroadcaster 또는 NotificationEmitter 이다고 보여져 반환되는 프록시는 NotificationEmitterinterfaceClass 를 구현합니다. 이 프록시상에서 NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) 를 호출하면(자),MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object) 가 불려 갑니다. NotificationBroadcasterNotificationEmitter 의 그 외의 메소드의 경우도 같습니다.

형태 파라미터:
T - 예를 들어,interfaceClass 파라미터가 MyMBean.class 이면, 반환값의 형태는 MyMBean 가 되는 것을 컴파일러에 알린다.
파라미터:
connection - 송신지의 MBean 서버
objectName - connection 내에서 건네받는다 MBean 의 이름
interfaceClass - MXBean 인터페이스. 이것도 반환되는 프록시에 의해 구현되는
notificationBroadcaster - connection 경유로 메소드를 건네주는 것으로, 반환된 프록시에 NotificationEmitter 를 구현시킨다
반환값:
새로운 프록시의 인스턴스

isMXBeanInterface

public static boolean isMXBeanInterface(Class <? > interfaceClass)

인터페이스가 MXBean 인터페이스인가 어떤가를 테스트합니다. @MXBean 또는 @MXBean(true) 가 주석으로서 부가되고 있는지,@MXBean 의 주석은 없지만 이름이 "MXBean" 로 끝나는 경우는, MXBean 인터페이스입니다.

파라미터:
interfaceClass - 후보의 인터페이스
반환값:
interfaceClass 가 인터페이스이며, 나타난 조건을 채우는 경우는 true
예외:
NullPointerException - interfaceClass 가 null 의 경우

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 도 참조해 주세요.