Methods Summary |
---|
public void | addNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)Adds a listener to a registered MBean.
A notification emitted by an MBean will be forwarded by the
MBeanServer to the listener. If the source of the notification
is a reference to an MBean object, the MBean server will replace it
by that MBean's ObjectName. Otherwise the source is unchanged.
|
public void | addNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback)Adds a listener to a registered MBean.
A notification emitted by an MBean will be forwarded by the
MBeanServer to the listener. If the source of the notification
is a reference to an MBean object, the MBean server will
replace it by that MBean's ObjectName. Otherwise the source is
unchanged.
The listener object that receives notifications is the one
that is registered with the given name at the time this method
is called. Even if it is subsequently unregistered, it will
continue to receive notifications.
|
public javax.management.ObjectInstance | createMBean(java.lang.String className, javax.management.ObjectName name)Instantiates and registers an MBean in the MBean server. The
MBean server will use its {@link
javax.management.loading.ClassLoaderRepository Default Loader
Repository} to load the class of the MBean. An object name is
associated to the MBean. If the object name given is null, the
MBean must provide its own name by implementing the {@link
javax.management.MBeanRegistration MBeanRegistration} interface
and returning the name from the {@link
MBeanRegistration#preRegister preRegister} method.
This method is equivalent to {@link
#createMBean(String,ObjectName,Object[],String[])
createMBean(className, name, (Object[]) null, (String[])
null)}.
|
public javax.management.ObjectInstance | createMBean(java.lang.String className, javax.management.ObjectName name, javax.management.ObjectName loaderName)Instantiates and registers an MBean in the MBean server. The
class loader to be used is identified by its object name. An
object name is associated to the MBean. If the object name of
the loader is null, the ClassLoader that loaded the MBean
server will be used. If the MBean's object name given is null,
the MBean must provide its own name by implementing the {@link
javax.management.MBeanRegistration MBeanRegistration} interface
and returning the name from the {@link
MBeanRegistration#preRegister preRegister} method.
This method is equivalent to {@link
#createMBean(String,ObjectName,ObjectName,Object[],String[])
createMBean(className, name, loaderName, (Object[]) null,
(String[]) null)}.
|
public javax.management.ObjectInstance | createMBean(java.lang.String className, javax.management.ObjectName name, java.lang.Object[] params, java.lang.String[] signature)Instantiates and registers an MBean in the MBean server. The
MBean server will use its {@link
javax.management.loading.ClassLoaderRepository Default Loader
Repository} to load the class of the MBean. An object name is
associated to the MBean. If the object name given is null, the
MBean must provide its own name by implementing the {@link
javax.management.MBeanRegistration MBeanRegistration} interface
and returning the name from the {@link
MBeanRegistration#preRegister preRegister} method.
|
public javax.management.ObjectInstance | createMBean(java.lang.String className, javax.management.ObjectName name, javax.management.ObjectName loaderName, java.lang.Object[] params, java.lang.String[] signature)Instantiates and registers an MBean in the MBean server. The
class loader to be used is identified by its object name. An
object name is associated to the MBean. If the object name of
the loader is not specified, the ClassLoader that loaded the
MBean server will be used. If the MBean object name given is
null, the MBean must provide its own name by implementing the
{@link javax.management.MBeanRegistration MBeanRegistration}
interface and returning the name from the {@link
MBeanRegistration#preRegister preRegister} method.
|
public java.lang.Object | getAttribute(javax.management.ObjectName name, java.lang.String attribute)Gets the value of a specific attribute of a named MBean. The MBean
is identified by its object name.
|
public javax.management.AttributeList | getAttributes(javax.management.ObjectName name, java.lang.String[] attributes)Enables the values of several attributes of a named MBean. The MBean
is identified by its object name.
|
public java.lang.String | getDefaultDomain()Returns the default domain used for naming the MBean.
The default domain name is used as the domain part in the ObjectName
of MBeans if no domain is specified by the user.
|
public java.lang.String[] | getDomains()Returns the list of domains in which any MBean is currently
registered. A string is in the returned array if and only if
there is at least one MBean registered with an ObjectName whose
{@link ObjectName#getDomain() getDomain()} is equal to that
string. The order of strings within the returned array is
not defined.
|
public java.lang.Integer | getMBeanCount()Returns the number of MBeans registered in the MBean server.
|
public javax.management.MBeanInfo | getMBeanInfo(javax.management.ObjectName name)This method discovers the attributes and operations that an
MBean exposes for management.
|
public javax.management.ObjectInstance | getObjectInstance(javax.management.ObjectName name)Gets the ObjectInstance for a given MBean
registered with the MBean server.
|
public java.lang.Object | invoke(javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)Invokes an operation on an MBean.
|
public boolean | isInstanceOf(javax.management.ObjectName name, java.lang.String className)Returns true if the MBean specified is an instance of the
specified class, false otherwise.
If name does not name an MBean, this method
throws {@link InstanceNotFoundException}.
Otherwise, let
X be the MBean named by name ,
L be the ClassLoader of X,
N be the class name in X's {@link MBeanInfo}.
If N equals className , the result is true.
Otherwise, if L successfully loads both N and
className , and the second class is assignable from
the first, the result is true.
Otherwise, the result is false.
|
public boolean | isRegistered(javax.management.ObjectName name)Checks whether an MBean, identified by its object name, is
already registered with the MBean server.
|
public java.util.Set | queryMBeans(javax.management.ObjectName name, javax.management.QueryExp query)Gets MBeans controlled by the MBean server. This method allows
any of the following to be obtained: All MBeans, a set of
MBeans specified by pattern matching on the
ObjectName and/or a Query expression, a specific
MBean. When the object name is null or no domain and key
properties are specified, all objects are to be selected (and
filtered if a query is specified). It returns the set of
ObjectInstance objects (containing the
ObjectName and the Java Class name) for the
selected MBeans.
|
public java.util.Set | queryNames(javax.management.ObjectName name, javax.management.QueryExp query)Gets the names of MBeans controlled by the MBean server. This
method enables any of the following to be obtained: The names
of all MBeans, the names of a set of MBeans specified by
pattern matching on the ObjectName and/or a Query
expression, a specific MBean name (equivalent to testing
whether an MBean is registered). When the object name is null
or no domain and key properties are specified, all objects are
selected (and filtered if a query is specified). It returns the
set of ObjectNames for the MBeans selected.
|
public void | removeNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener)Removes a listener from a registered MBean.
If the listener is registered more than once, perhaps with
different filters or callbacks, this method will remove all
those registrations.
|
public void | removeNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback)Removes a listener from a registered MBean.
The MBean must have a listener that exactly matches the
given listener , filter , and
handback parameters. If there is more than one
such listener, only one is removed.
The filter and handback parameters
may be null if and only if they are null in a listener to be
removed.
|
public void | removeNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener)Removes a listener from a registered MBean.
If the listener is registered more than once, perhaps with
different filters or callbacks, this method will remove all
those registrations.
|
public void | removeNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)Removes a listener from a registered MBean.
The MBean must have a listener that exactly matches the
given listener , filter , and
handback parameters. If there is more than one
such listener, only one is removed.
The filter and handback parameters
may be null if and only if they are null in a listener to be
removed.
|
public void | setAttribute(javax.management.ObjectName name, javax.management.Attribute attribute)Sets the value of a specific attribute of a named MBean. The MBean
is identified by its object name.
|
public javax.management.AttributeList | setAttributes(javax.management.ObjectName name, javax.management.AttributeList attributes)Sets the values of several attributes of a named MBean. The MBean is
identified by its object name.
|
public void | unregisterMBean(javax.management.ObjectName name)Unregisters an MBean from the MBean server. The MBean is
identified by its object name. Once the method has been
invoked, the MBean may no longer be accessed by its object
name.
|