提交 ae9e48e3 编写于 作者: E emcmanus

6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted

Summary: Make spec more readable by adding cross-references.  Suggested by Andrew Haley.
Reviewed-by: dfuchs
上级 b5cc567e
...@@ -50,7 +50,7 @@ import javax.management.loading.ClassLoaderRepository; ...@@ -50,7 +50,7 @@ import javax.management.loading.ClassLoaderRepository;
* server. A Java object cannot be registered in the MBean server * server. A Java object cannot be registered in the MBean server
* unless it is a JMX compliant MBean.</p> * unless it is a JMX compliant MBean.</p>
* *
* <p>When an MBean is registered or unregistered in the MBean server * <p id="notif">When an MBean is registered or unregistered in the MBean server
* a {@link javax.management.MBeanServerNotification * a {@link javax.management.MBeanServerNotification
* MBeanServerNotification} Notification is emitted. To register an * MBeanServerNotification} Notification is emitted. To register an
* object as listener to MBeanServerNotifications you should call the * object as listener to MBeanServerNotifications you should call the
...@@ -258,27 +258,43 @@ import javax.management.loading.ClassLoaderRepository; ...@@ -258,27 +258,43 @@ import javax.management.loading.ClassLoaderRepository;
*/ */
public interface MBeanServer extends MBeanServerConnection { public interface MBeanServer extends MBeanServerConnection {
// doc comment inherited from MBeanServerConnection /**
* {@inheritDoc}
* <p>If this method successfully creates an MBean, a notification
* is sent as described <a href="#notif">above</a>.</p>
*/
public ObjectInstance createMBean(String className, ObjectName name) public ObjectInstance createMBean(String className, ObjectName name)
throws ReflectionException, InstanceAlreadyExistsException, throws ReflectionException, InstanceAlreadyExistsException,
MBeanRegistrationException, MBeanException, MBeanRegistrationException, MBeanException,
NotCompliantMBeanException; NotCompliantMBeanException;
// doc comment inherited from MBeanServerConnection /**
* {@inheritDoc}
* <p>If this method successfully creates an MBean, a notification
* is sent as described <a href="#notif">above</a>.</p>
*/
public ObjectInstance createMBean(String className, ObjectName name, public ObjectInstance createMBean(String className, ObjectName name,
ObjectName loaderName) ObjectName loaderName)
throws ReflectionException, InstanceAlreadyExistsException, throws ReflectionException, InstanceAlreadyExistsException,
MBeanRegistrationException, MBeanException, MBeanRegistrationException, MBeanException,
NotCompliantMBeanException, InstanceNotFoundException; NotCompliantMBeanException, InstanceNotFoundException;
// doc comment inherited from MBeanServerConnection /**
* {@inheritDoc}
* <p>If this method successfully creates an MBean, a notification
* is sent as described <a href="#notif">above</a>.</p>
*/
public ObjectInstance createMBean(String className, ObjectName name, public ObjectInstance createMBean(String className, ObjectName name,
Object params[], String signature[]) Object params[], String signature[])
throws ReflectionException, InstanceAlreadyExistsException, throws ReflectionException, InstanceAlreadyExistsException,
MBeanRegistrationException, MBeanException, MBeanRegistrationException, MBeanException,
NotCompliantMBeanException; NotCompliantMBeanException;
// doc comment inherited from MBeanServerConnection /**
* {@inheritDoc}
* <p>If this method successfully creates an MBean, a notification
* is sent as described <a href="#notif">above</a>.</p>
*/
public ObjectInstance createMBean(String className, ObjectName name, public ObjectInstance createMBean(String className, ObjectName name,
ObjectName loaderName, Object params[], ObjectName loaderName, Object params[],
String signature[]) String signature[])
...@@ -287,12 +303,15 @@ public interface MBeanServer extends MBeanServerConnection { ...@@ -287,12 +303,15 @@ public interface MBeanServer extends MBeanServerConnection {
NotCompliantMBeanException, InstanceNotFoundException; NotCompliantMBeanException, InstanceNotFoundException;
/** /**
* Registers a pre-existing object as an MBean with the MBean * <p>Registers a pre-existing object as an MBean with the MBean
* server. If the object name given is null, the MBean must * server. If the object name given is null, the MBean must
* provide its own name by implementing the {@link * provide its own name by implementing the {@link
* javax.management.MBeanRegistration MBeanRegistration} interface * javax.management.MBeanRegistration MBeanRegistration} interface
* and returning the name from the {@link * and returning the name from the {@link
* MBeanRegistration#preRegister preRegister} method. * MBeanRegistration#preRegister preRegister} method.</p>
*
* <p>If this method successfully registers an MBean, a notification
* is sent as described <a href="#notif">above</a>.</p>
* *
* @param object The MBean to be registered as an MBean. * @param object The MBean to be registered as an MBean.
* @param name The object name of the MBean. May be null. * @param name The object name of the MBean. May be null.
...@@ -319,7 +338,12 @@ public interface MBeanServer extends MBeanServerConnection { ...@@ -319,7 +338,12 @@ public interface MBeanServer extends MBeanServerConnection {
throws InstanceAlreadyExistsException, MBeanRegistrationException, throws InstanceAlreadyExistsException, MBeanRegistrationException,
NotCompliantMBeanException; NotCompliantMBeanException;
// doc comment inherited from MBeanServerConnection /**
* {@inheritDoc}
*
* <p>If this method successfully unregisters an MBean, a notification
* is sent as described <a href="#notif">above</a>.</p>
*/
public void unregisterMBean(ObjectName name) public void unregisterMBean(ObjectName name)
throws InstanceNotFoundException, MBeanRegistrationException; throws InstanceNotFoundException, MBeanRegistrationException;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册