public interface JmxConnection
JmxConnection
interface provides access to the MBeans registered
on the JVM the VDP Server is running.
If the custom policy was assigned by an administrator, all the MBeans in the
JVM will be available. However, if the custom policy was assigned by an user
who has administration privileges in certain databases, only the MBeans
related to these databases will be available. If the custom policy tries to
access a MBean that is not allowed to an
InsufficientPrivilegeException
will be thrown.
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(ObjectName name,
String attribute)
Gets the value of a specific attribute of a named MBean.
|
AttributeList |
getAttributes(ObjectName name,
String[] attributes)
Enables the values of several attributes of a named MBean.
|
MBeanInfo |
getMBeanInfo(ObjectName name)
This method discovers the attributes and operations that an MBean exposes
for management.
|
Object |
invoke(ObjectName name,
String operationName,
Object[] params,
String[] signature)
Invokes an operation on an MBean.
|
boolean |
isRegistered(ObjectName name)
Checks whether an MBean, identified by its object name, is already
registered with the MBean server.
|
Set<ObjectInstance> |
queryMBeans(ObjectName name,
QueryExp query)
Gets MBeans controlled by the MBean server.
|
Set<ObjectName> |
queryNames(ObjectName name,
QueryExp query)
Gets the names of MBeans controlled by the MBean server.
|
boolean isRegistered(ObjectName name) throws IOException, InsufficientPrivilegeException
name
- The object name of the MBean to be checked.RuntimeOperationsException
- Wraps a java.lang.IllegalArgumentException
: The
object name in parameter is nullIOException
- A communication problem occurred when talking to the MBean
server.InsufficientPrivilegeException
- The custom policy is not allowed to access this MBeanMBeanServerConnection.isRegistered(ObjectName)
Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query) throws IOException, InsufficientPrivilegeException
ObjectName
and/or a Query expression, a
specific MBean.name
- The object name pattern identifying the MBeans to be
retrieved. If null or no domain and key properties are
specified, all the MBeans registered will be retrieved.query
- The query expression to be applied for selecting MBeans. If
null no query expression will be applied for selecting MBeans.ObjectInstance
objects for the
selected MBeans. If no MBean satisfies the query an empty list is
returned.IOException
- A communication problem occurred when talking to the MBean
server.InsufficientPrivilegeException
- The custom policy is not allowed to access some of these
MBeansMBeanServerConnection.queryMBeans(ObjectName, QueryExp)
Set<ObjectName> queryNames(ObjectName name, QueryExp query) throws IOException, InsufficientPrivilegeException
ObjectName
and/or a Query expression, a specific MBean name
(equivalent to testing whether an MBean is registered).name
- The object name pattern identifying the MBean names to be
retrieved. If null or no domain and key properties are
specified, the name of all registered MBeans will be
retrieved.query
- The query expression to be applied for selecting MBeans. If
null no query expression will be applied for selecting MBeans.IOException
- A communication problem occurred when talking to the MBean
server.InsufficientPrivilegeException
- The custom policy is not allowed to access some of these
MBeansMBeanServerConnection.queryNames(ObjectName, QueryExp)
Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, IOException, InsufficientPrivilegeException
name
- The object name of the MBean from which the attribute is to be
retrieved.attribute
- A String specifying the name of the attribute to be retrieved.AttributeNotFoundException
- The attribute specified is not accessible in the MBean.MBeanException
- Wraps an exception thrown by the MBean's getter.InstanceNotFoundException
- The MBean specified is not registered in the MBean server.ReflectionException
- Wraps a java.lang.Exception
thrown when trying to
invoke the setter.RuntimeOperationsException
- Wraps a java.lang.IllegalArgumentException
: The
object name in parameter is null or the attribute in
parameter is null.IOException
- A communication problem occurred when talking to the MBean
server.InsufficientPrivilegeException
- The custom policy is not allowed to access this MBeanMBeanServerConnection.getAttribute(ObjectName, String)
AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException, IOException, InsufficientPrivilegeException
name
- The object name of the MBean from which the attributes are
retrieved.attributes
- A list of the attributes to be retrieved.InstanceNotFoundException
- The MBean specified is not registered in the MBean server.ReflectionException
- An exception occurred when trying to invoke the getAttributes
method of a Dynamic MBean.RuntimeOperationsException
- Wrap a java.lang.IllegalArgumentException
: The object
name in parameter is null or attributes in parameter is null.IOException
- A communication problem occurred when talking to the MBean
server.InsufficientPrivilegeException
- The custom policy is not allowed to access this MBeanMBeanServerConnection.getAttributes(ObjectName, String[])
Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException, IOException, InsufficientPrivilegeException
name
- The object name of the MBean on which the method is to be
invoked.operationName
- The name of the operation to be invoked.params
- An array containing the parameters to be set when the
operation is invokedsignature
- An array containing the signature of the operation. The class
objects will be loaded using the same class loader as the one
used for loading the MBean on which the operation was invoked.InstanceNotFoundException
- The MBean specified is not registered in the MBean server.MBeanException
- Wraps an exception thrown by the MBean's invoked method.ReflectionException
- Wraps a Exception
thrown while trying to
invoke the method.IOException
- A communication problem occurred when talking to the MBean
server.InsufficientPrivilegeException
- The custom policy is not allowed to access this MBeanMBeanServerConnection.invoke(ObjectName, String, Object[], String[])
MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, InsufficientPrivilegeException
name
- The name of the MBean to analyzeMBeanInfo
allowing the retrieval of all
attributes and operations of this MBean.IntrospectionException
- An exception occurred during introspection.InstanceNotFoundException
- The MBean specified was not found.ReflectionException
- An exception occurred when trying to invoke the getMBeanInfo
of a Dynamic MBean.IOException
- A communication problem occurred when talking to the MBean
server.InsufficientPrivilegeException
- The custom policy is not allowed to access this MBeanMBeanServerConnection.getMBeanInfo(ObjectName)
Copyright © 2023 Denodo Technologies. All rights reserved.