public enum MBeans extends Enum<MBeans>
Modifier and Type | Method and Description |
---|---|
static MBeanServer |
getMBeanServer()
Returns the first registered MBean server, or the platform MBean server
if there is none.
|
static boolean |
isRegistered(String objectName)
Returns true if an MBean identified by the specified object name is
already registered with the first MBean server, or the platform MBean
server if there is no explicitly registered MBean server; false
otherwise.
|
static <T> boolean |
registerMBean(String objectName,
T mbean)
Registers the given MBean under the given object name to the first
registered MBean server, or the platform MBean server if there is no
explicitly registered MBean server.
|
static <T> boolean |
unregisterMBean(String objectName)
Unregisters the MBean under the given object name to the first MBean
server, or the platform MBean server if there is no explicitly registered
MBean server.
|
static MBeans |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MBeans[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static MBeans[] values()
for (MBeans c : MBeans.values()) System.out.println(c);
public static MBeans valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static <T> boolean registerMBean(String objectName, T mbean) throws MBeanRegistrationException
MBeanRegistrationException
- The preRegister (MBeanRegistration interface) method of the
MBean has thrown an exception. The MBean will not be
registered.public static <T> boolean unregisterMBean(String objectName) throws MBeanRegistrationException
MBeanRegistrationException
- Wraps exceptions thrown by the preRegister(), preDeregister()
methods of the MBeanRegistration interface.public static boolean isRegistered(String objectName)
public static MBeanServer getMBeanServer()
Copyright © 2023. All rights reserved.