APIdia Launch Partner
Top Description Fields Constructors Methods
sun.management

public Class HotspotInternal

extends Object
implements HotspotInternalMBean, MBeanRegistration
Class Inheritance
All Implemented Interfaces
javax.management.MBeanRegistration, sun.management.HotspotInternalMBean
Imports
javax.management.MBeanRegistration, .MBeanServer, .ObjectName

Implementation class of HotspotInternalMBean interface.

This is designed for internal customer use to create this MBean dynamically from an agent which will then register all internal MBeans to the platform MBeanServer.

Field Summary

Modifier and TypeField and Description
private static final String
private static ObjectName
private MBeanServer

Constructor Summary

AccessConstructor and Description
public
HotspotInternal()

Default constructor that registers all hotspot internal MBeans to the MBeanServer that creates this MBean.

Method Summary

Modifier and TypeMethod and Description
public void
postDeregister()

Implements javax.management.MBeanRegistration.postDeregister.

Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

public void
postRegister(Boolean registrationDone)

Implements javax.management.MBeanRegistration.postRegister.

Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

public void
preDeregister()

Implements javax.management.MBeanRegistration.preDeregister.

Allows the MBean to perform any operations it needs before being unregistered by the MBean server.

public ObjectName
preRegister(MBeanServer server, ObjectName name)

Implements javax.management.MBeanRegistration.preRegister.

Allows the MBean to perform any operations it needs before being registered in the MBean Server.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HOTSPOT_INTERNAL_MBEAN_NAMEback to summary
private static final String HOTSPOT_INTERNAL_MBEAN_NAME
objNameback to summary
private static ObjectName objName
serverback to summary
private MBeanServer server

Constructor Detail

HotspotInternalback to summary
public HotspotInternal()

Default constructor that registers all hotspot internal MBeans to the MBeanServer that creates this MBean.

Method Detail

postDeregisterback to summary
public void postDeregister()

Implements javax.management.MBeanRegistration.postDeregister.

Doc from javax.management.MBeanRegistration.postDeregister.

Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postDeregister will not change the state of the MBean: the MBean was already successfully deregistered and will remain so.

This might be confusing for the code calling unregisterMBean(), as it might assume that MBean deregistration has failed. Therefore it is recommended that implementations of postDeregister do not throw Runtime Exceptions or Errors if it can be avoided.

postRegisterback to summary
public void postRegister(Boolean registrationDone)

Implements javax.management.MBeanRegistration.postRegister.

Doc from javax.management.MBeanRegistration.postRegister.

Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postRegister will not change the state of the MBean: if the MBean was already registered (registrationDone is true), the MBean will remain registered.

This might be confusing for the code calling createMBean() or registerMBean(), as such code might assume that MBean registration has failed when such an exception is raised. Therefore it is recommended that implementations of postRegister do not throw Runtime Exceptions or Errors if it can be avoided.

preDeregisterback to summary
public void preDeregister() throws Exception

Implements javax.management.MBeanRegistration.preDeregister.

Doc from javax.management.MBeanRegistration.preDeregister.

Allows the MBean to perform any operations it needs before being unregistered by the MBean server.

Exceptions
Exception:
This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException.
preRegisterback to summary
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception

Implements javax.management.MBeanRegistration.preRegister.

Doc from javax.management.MBeanRegistration.preRegister.

Allows the MBean to perform any operations it needs before being registered in the MBean Server. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBean Server.

Exceptions
Exception:
This exception will be caught by the MBean Server and re-thrown as an MBeanRegistrationException.