|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The interface used to access the MBean server instances.
MBeanServerFactory (src) ,
ClassLoaderRepository (src) | Method Summary | |
void |
addNotificationListener(ObjectName (src) name,
NotificationListener (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
Add a notification listener to an MBean. |
void |
addNotificationListener(ObjectName (src) name,
ObjectName (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
Add a notification listener to an MBean. |
ObjectInstance (src) |
createMBean(java.lang.String className,
ObjectName (src) name)
Create an MBean registered using the given object name. |
ObjectInstance (src) |
createMBean(java.lang.String className,
ObjectName (src) name,
java.lang.Object[] params,
java.lang.String[] signature)
Create an MBean registered using the given object name. |
ObjectInstance (src) |
createMBean(java.lang.String className,
ObjectName (src) name,
ObjectName (src) loaderName)
Create an MBean registered using the given object name. |
ObjectInstance (src) |
createMBean(java.lang.String className,
ObjectName (src) name,
ObjectName (src) loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Create an MBean registered using the given object name. |
java.io.ObjectInputStream |
deserialize(ObjectName (src) name,
byte[] data)
Deprecated. use getClassLoaderFor(ObjectName) to obtain the
appropriate classloader for deserialization |
java.io.ObjectInputStream |
deserialize(java.lang.String className,
byte[] data)
Deprecated. use getClassLoaderFor(ObjectName) to obtain the
appropriate classloader for deserialization |
java.io.ObjectInputStream |
deserialize(java.lang.String className,
ObjectName (src) loaderName,
byte[] data)
Deprecated. use getClassLoaderFor(ObjectName) to obtain the
appropriate classloader for deserialization |
java.lang.Object |
getAttribute(ObjectName (src) name,
java.lang.String attribute)
Retrieve a value from an MBean. |
AttributeList (src) |
getAttributes(ObjectName (src) name,
java.lang.String[] attributes)
Retrieve a list of values from an MBean. |
java.lang.ClassLoader |
getClassLoader(ObjectName (src) name)
Retrieve the classloader registered as an MBean |
java.lang.ClassLoader |
getClassLoaderFor(ObjectName (src) name)
Retrieve the classloader for an mbean |
ClassLoaderRepository (src) |
getClassLoaderRepository()
Retrieve the classloader repository for this mbean server |
java.lang.String |
getDefaultDomain()
Retrieve the default domain of the mbeanserver. |
java.lang.String[] |
getDomains()
Retrieve the domains of the mbeanserver. |
java.lang.Integer |
getMBeanCount()
Retrieve the number of mbeans registered in the server. |
MBeanInfo (src) |
getMBeanInfo(ObjectName (src) name)
Retrieves the jmx metadata for an mbean |
ObjectInstance (src) |
getObjectInstance(ObjectName (src) name)
Retrieve an MBean's registration information. |
java.lang.Object |
instantiate(java.lang.String className)
Instantiates an object using the default loader repository and default no-args constructor. |
java.lang.Object |
instantiate(java.lang.String className,
java.lang.Object[] params,
java.lang.String[] signature)
Instantiates an object using the default loader repository and a given constructor. |
java.lang.Object |
instantiate(java.lang.String className,
ObjectName (src) loaderName)
Instantiates an object using the given class loader. |
java.lang.Object |
instantiate(java.lang.String className,
ObjectName (src) loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Instantiates an object using the given class loader. |
java.lang.Object |
invoke(ObjectName (src) name,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
Invokes an operation on an mbean. |
boolean |
isInstanceOf(ObjectName (src) name,
java.lang.String className)
Tests whether an mbean can be cast to the given type |
boolean |
isRegistered(ObjectName (src) name)
Test whether an mbean is registered. |
java.util.Set |
queryMBeans(ObjectName (src) name,
QueryExp (src) query)
Retrieve a set of Object instances |
java.util.Set |
queryNames(ObjectName (src) name,
QueryExp (src) query)
Retrieve a set of Object names |
ObjectInstance (src) |
registerMBean(java.lang.Object object,
ObjectName (src) name)
Registers an mbean. |
void |
removeNotificationListener(ObjectName (src) name,
NotificationListener (src) listener)
Removes a listener from an mbean. |
void |
removeNotificationListener(ObjectName (src) name,
NotificationListener (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
Removes a listener from an mbean. |
void |
removeNotificationListener(ObjectName (src) name,
ObjectName (src) listener)
Removes a listener from an mbean. |
void |
removeNotificationListener(ObjectName (src) name,
ObjectName (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
Removes a listener from an mbean. |
void |
setAttribute(ObjectName (src) name,
Attribute (src) attribute)
Set a value for an MBean. |
AttributeList (src) |
setAttributes(ObjectName (src) name,
AttributeList (src) attributes)
Set a list of values for an MBean. |
void |
unregisterMBean(ObjectName (src) name)
Unregisters an mbean. |
| Method Detail |
public ObjectInstance (src) createMBean(java.lang.String className,
ObjectName (src) name)
throws ReflectionException (src) ,
InstanceAlreadyExistsException (src) ,
MBeanRegistrationException (src) ,
MBeanException (src) ,
NotCompliantMBeanException (src)
Uses the default contructor.
createMBean in interface MBeanServerConnection (src) className - the class name of the mbeanname - the object name for registration, can be null
ReflectionException (src) - for class not found or an exception
invoking the contructor
InstanceAlreadyExistsException (src) - for an MBean already registered
with the passed or generated ObjectName
MBeanRegistrationException (src) - for any exception thrown by the
MBean's preRegister
MBeanException (src) - for any exception thrown by the MBean's constructor
NotCompliantMBeanException (src) - if the class name does not correspond to
a valid MBean
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null class name, the ObjectName could not be determined or it is a pattern
public ObjectInstance (src) createMBean(java.lang.String className,
ObjectName (src) name,
ObjectName (src) loaderName)
throws ReflectionException (src) ,
InstanceAlreadyExistsException (src) ,
MBeanRegistrationException (src) ,
MBeanException (src) ,
NotCompliantMBeanException (src) ,
InstanceNotFoundException (src)
The MBean is loaded using the passed classloader. Uses the default contructor.
createMBean in interface MBeanServerConnection (src) className - the class name of the mbeanloaderName - an MBean that implements a classloadername - the object name for registration, can be null
ReflectionException (src) - for class not found or an exception
invoking the contructor
InstanceAlreadyExistsException (src) - for an MBean already registered
with the passed or generated ObjectName
MBeanRegistrationException (src) - for any exception thrown by the
MBean's preRegister
MBeanException (src) - for any exception thrown by the MBean's constructor
InstanceNotFoundException (src) - if the loaderName is not a classloader registered
in the MBeanServer
NotCompliantMBeanException (src) - if the class name does not correspond to
a valid MBean
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null class name, the ObjectName could not be determined or it is a pattern
public ObjectInstance (src) createMBean(java.lang.String className,
ObjectName (src) name,
java.lang.Object[] params,
java.lang.String[] signature)
throws ReflectionException (src) ,
InstanceAlreadyExistsException (src) ,
MBeanRegistrationException (src) ,
MBeanException (src) ,
NotCompliantMBeanException (src)
Uses the specified constructor.
createMBean in interface MBeanServerConnection (src) className - the class name of the mbeanparams - the parameters for the constructorsignature - the signature of the constructorname - the object name for registration, can be null
ReflectionException (src) - for class not found or an exception
invoking the contructor
InstanceAlreadyExistsException (src) - for an MBean already registered
with the passed or generated ObjectName
MBeanRegistrationException (src) - for any exception thrown by the
MBean's preRegister
MBeanException (src) - for any exception thrown by the MBean's constructor
NotCompliantMBeanException (src) - if the class name does not correspond to
a valid MBean
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null class name, the ObjectName could not be determined or it is a pattern
public ObjectInstance (src) createMBean(java.lang.String className,
ObjectName (src) name,
ObjectName (src) loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
throws ReflectionException (src) ,
InstanceAlreadyExistsException (src) ,
MBeanRegistrationException (src) ,
MBeanException (src) ,
NotCompliantMBeanException (src) ,
InstanceNotFoundException (src)
The MBean is loaded using the passed classloader. Uses the specified constructor.
createMBean in interface MBeanServerConnection (src) className - the class name of the mbeanloaderName - an MBean that implements a classloadername - the object name for registration, can be nullparams - the parameters for the constructorsignature - the signature of the constructor
ReflectionException (src) - for class not found or an exception
invoking the contructor
InstanceAlreadyExistsException (src) - for an MBean already registered
with the passed or generated ObjectName
MBeanRegistrationException (src) - for any exception thrown by the
MBean's preRegister
MBeanException (src) - for any exception thrown by the MBean's constructor
InstanceNotFoundException (src) - if the loaderName is not a classloader registered
in the MBeanServer
NotCompliantMBeanException (src) - if the class name does not correspond to
a valid MBean
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null class name, the ObjectName could not be determined or it is a pattern
public ObjectInstance (src) registerMBean(java.lang.Object object,
ObjectName (src) name)
throws InstanceAlreadyExistsException (src) ,
MBeanRegistrationException (src) ,
NotCompliantMBeanException (src)
object - the mbean implementation to registername - the object name of the mbean to register
InstanceAlreadyExistsException (src) - if the object name is already registered
in the MBeanServer
MBeanRegistrationException (src) - for any exception thrown by the
MBean's preDeregister
NotCompliantMBeanException (src) - if the class name does not correspond to
a valid MBean
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null name, or trying to register a JMX implementation MBean
public void unregisterMBean(ObjectName (src) name)
throws InstanceNotFoundException (src) ,
MBeanRegistrationException (src)
unregisterMBean in interface MBeanServerConnection (src) name - the object name of the mbean to unregister
InstanceNotFoundException (src) - if the mbean is not registered
in the MBeanServer
MBeanRegistrationException (src) - for any exception thrown by the
MBean's preDeregister
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null name, or trying to unregister a JMX implementation MBean
public ObjectInstance (src) getObjectInstance(ObjectName (src) name)
throws InstanceNotFoundException (src)
getObjectInstance in interface MBeanServerConnection (src) name - the object name of the mbean
InstanceNotFoundException (src) - if the mbean is not registered
in the MBeanServer
public java.util.Set queryMBeans(ObjectName (src) name,
QueryExp (src) query)
queryMBeans in interface MBeanServerConnection (src) name - an ObjectName pattern, can be null for all mbeansquery - a query expression to further filter the mbeans, can be null
for no query
public java.util.Set queryNames(ObjectName (src) name,
QueryExp (src) query)
queryNames in interface MBeanServerConnection (src) name - an ObjectName pattern, can be null for all mbeansquery - a query expression to further filter the mbeans, can be null
for no querypublic boolean isRegistered(ObjectName (src) name)
isRegistered in interface MBeanServerConnection (src) name - the object name of the mbean
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null namepublic java.lang.Integer getMBeanCount()
getMBeanCount in interface MBeanServerConnection (src)
public java.lang.Object getAttribute(ObjectName (src) name,
java.lang.String attribute)
throws MBeanException (src) ,
AttributeNotFoundException (src) ,
InstanceNotFoundException (src) ,
ReflectionException (src)
getAttribute in interface MBeanServerConnection (src) name - the object name of the mbeanattribute - the attribute name of the value to retrieve
ReflectionException (src) - for an exception invoking the mbean
MBeanException (src) - for any exception thrown by the mbean
InstanceNotFoundException (src) - if the mbean is not registered
AttributeNotFoundException (src) - if the mbean has no such attribute
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null name or attribute
public AttributeList (src) getAttributes(ObjectName (src) name,
java.lang.String[] attributes)
throws InstanceNotFoundException (src) ,
ReflectionException (src)
getAttributes in interface MBeanServerConnection (src) name - the object name of the mbeanattributes - the attribute names of the values to retrieve
ReflectionException (src) - for an exception invoking the mbean
InstanceNotFoundException (src) - if the mbean is not registered
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null name or attributes
public void setAttribute(ObjectName (src) name,
Attribute (src) attribute)
throws InstanceNotFoundException (src) ,
AttributeNotFoundException (src) ,
InvalidAttributeValueException (src) ,
MBeanException (src) ,
ReflectionException (src)
setAttribute in interface MBeanServerConnection (src) name - the object name of the mbeanattribute - the attribute name and value to set
ReflectionException (src) - for an exception invoking the mbean
MBeanException (src) - for any exception thrown by the mbean
InstanceNotFoundException (src) - if the mbean is not registered
AttributeNotFoundException (src) - if the mbean has no such attribute
InvalidAttributeValueException (src) - if the new value has an incorrect type
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null name or attribute
public AttributeList (src) setAttributes(ObjectName (src) name,
AttributeList (src) attributes)
throws InstanceNotFoundException (src) ,
ReflectionException (src)
setAttributes in interface MBeanServerConnection (src) name - the object name of the mbeanattributes - the attribute names and values to set
ReflectionException (src) - for an exception invoking the mbean
InstanceNotFoundException (src) - if the mbean is not registered
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null name or attributes
public java.lang.Object invoke(ObjectName (src) name,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
throws InstanceNotFoundException (src) ,
MBeanException (src) ,
ReflectionException (src)
invoke in interface MBeanServerConnection (src) name - the object name of the mbeanoperationName - the operation to performparams - the parameterssignature - the signature of the operation
ReflectionException (src) - for an exception invoking the mbean
MBeanException (src) - for any exception thrown by the mbean
InstanceNotFoundException (src) - if the mbean is not registeredpublic java.lang.String getDefaultDomain()
getDefaultDomain in interface MBeanServerConnection (src) public java.lang.String[] getDomains()
getDomains in interface MBeanServerConnection (src)
public void addNotificationListener(ObjectName (src) name,
NotificationListener (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
throws InstanceNotFoundException (src)
addNotificationListener in interface MBeanServerConnection (src) name - the name of the MBean broadcasting notificationslistener - the listener to addfilter - a filter to preprocess notificationshandback - a object to add to any notifications
InstanceNotFoundException (src) - if the broadcaster is not registered
public void addNotificationListener(ObjectName (src) name,
ObjectName (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
throws InstanceNotFoundException (src)
addNotificationListener in interface MBeanServerConnection (src) name - the name of the MBean broadcasting notificationslistener - the object name listener to addfilter - a filter to preprocess notificationshandback - a object to add to any notifications
InstanceNotFoundException (src) - if the broadcaster or listener is not registered
RuntimeOperationsException (src) - wrapping an IllegalArgumentException for a
null listener or the listener does not implement the Notification Listener interface
public void removeNotificationListener(ObjectName (src) name,
ObjectName (src) listener)
throws InstanceNotFoundException (src) ,
ListenerNotFoundException (src)
All registrations of the listener are removed.
removeNotificationListener in interface MBeanServerConnection (src) name - the name of the MBean broadcasting notificationslistener - the object name of the listener to remove
InstanceNotFoundException (src) - if the broadcaster or listener is not registered
ListenerNotFoundException (src) - if the listener is not registered against the broadcaster
public void removeNotificationListener(ObjectName (src) name,
ObjectName (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
throws InstanceNotFoundException (src) ,
ListenerNotFoundException (src)
Only the listener that was registered with the same filter and handback is removed.
removeNotificationListener in interface MBeanServerConnection (src) name - the name of the MBean broadcasting notificationslistener - the object name of listener to removefilter - the filter of the listener to remove
InstanceNotFoundException (src) - if the broadcaster or listener is not registered
ListenerNotFoundException (src) - if the listener, filter, handback
is not registered against the broadcaster
public void removeNotificationListener(ObjectName (src) name,
NotificationListener (src) listener)
throws InstanceNotFoundException (src) ,
ListenerNotFoundException (src)
All registrations of the listener are removed.
removeNotificationListener in interface MBeanServerConnection (src) name - the name of the MBean broadcasting notificationslistener - the listener to remove
InstanceNotFoundException (src) - if the broadcaster is not registered
ListenerNotFoundException (src) - if the listener is not registered against the broadcaster
public void removeNotificationListener(ObjectName (src) name,
NotificationListener (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
throws InstanceNotFoundException (src) ,
ListenerNotFoundException (src)
Only the listener that was registered with the same filter and handback is removed.
removeNotificationListener in interface MBeanServerConnection (src) name - the name of the MBean broadcasting notificationslistener - the listener to removefilter - the filter of the listener to remove
InstanceNotFoundException (src) - if the broadcaster is not registered
ListenerNotFoundException (src) - if the listener, filter, handback
is not registered against the broadcaster
public MBeanInfo (src) getMBeanInfo(ObjectName (src) name)
throws InstanceNotFoundException (src) ,
IntrospectionException (src) ,
ReflectionException (src)
getMBeanInfo in interface MBeanServerConnection (src) name - the name of the mbean
IntrospectionException (src) - for any error during instrospection
InstanceNotFoundException (src) - if the mbean is not registered
ReflectionException (src) - for any error trying to invoke the operation on the mbean
public boolean isInstanceOf(ObjectName (src) name,
java.lang.String className)
throws InstanceNotFoundException (src)
isInstanceOf in interface MBeanServerConnection (src) name - the name of the mbeanclassName - the class name to check
InstanceNotFoundException (src) - if the mbean is not registered
public java.lang.Object instantiate(java.lang.String className)
throws ReflectionException (src) ,
MBeanException (src)
className - Class to instantiate. Must have a public no-args
constructor. Cannot contain a null reference.
ReflectionException (src) - If there was an error while trying to invoke
the class's constructor or the given class was not found. This
exception wraps the actual exception thrown.
MBeanException (src) - If the object constructor threw a checked exception
during the initialization. This exception wraps the actual
exception thrown.
RuntimeMBeanException (src) - If the class constructor threw a runtime
exception. This exception wraps the actual exception thrown.
RuntimeErrorException (src) - If the class constructor threw an error.
This exception wraps the actual error thrown.
RuntimeOperationsException (src) - If the className is null.
Wraps an IllegalArgumentException instance.DefaultLoaderRepository (src)
public java.lang.Object instantiate(java.lang.String className,
ObjectName (src) loaderName)
throws ReflectionException (src) ,
MBeanException (src) ,
InstanceNotFoundException (src)
className - Class to instantiate. Must have a public no args constructor.
Cannot contain a null reference.loaderName - Object name of a class loader that has been registered to the server.
If null, the class loader of the MBean server is used.
ReflectionException (src) - If there was an error while trying to invoke
the class's constructor or the given class was not found. This
exception wraps the actual exception thrown.
MBeanException (src) - If the object constructor threw a checked exception
during the initialization. This exception wraps the actual exception
thrown.
InstanceNotFoundException (src) - if the specified class loader was not
registered to the agent
RuntimeMBeanException (src) - If the class constructor raised a runtime
exception. This exception wraps the actual exception thrown.
RuntimeErrorException (src) - If the class constructor raised an error.
This exception wraps the actual error thrown.
RuntimeOperationsException (src) - if the className is null.
Wraps an IllegalArgumentException instance.
public java.lang.Object instantiate(java.lang.String className,
java.lang.Object[] params,
java.lang.String[] signature)
throws ReflectionException (src) ,
MBeanException (src)
className - class to instantiateparams - argument values for the constructor callsignature - signature of the constructor as fully qualified class names
ReflectionException (src) - If there was an error while trying to invoke
the class's constructor or the given class was not found. This
exception wraps the actual exception thrown.
MBeanException (src) - If the object constructor raised a checked exception
during the initialization. This exception wraps the actual exception
thrown.
RuntimeMBeanException (src) - If the class constructor raised a runtime
exception. This exception wraps the actual exception thrown.
RuntimeErrorException (src) - If the class constructor raised an error.
This exception wraps the actual error thrown.
RuntimeOperationsException (src) - if the className is null.
Wraps an IllegalArgumentException instance.DefaultLoaderRepository (src)
public java.lang.Object instantiate(java.lang.String className,
ObjectName (src) loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
throws ReflectionException (src) ,
MBeanException (src) ,
InstanceNotFoundException (src)
className - class to instantiateloaderName - object name of a registered class loader in the agent.params - argument values for the constructor callsignature - signature of the constructor as fully qualified class name strings
ReflectionException (src) - If there was an error while trying to invoke the
class's constructor or the given class was not found. this exception
wraps the actual exception thrown.
MBeanException (src) - If the object constructor raised a checked exception
during the initialization. This exception wraps the actual exception thrown.
InstanceNotFoundException (src) - if the specified class loader was not
registered to the agent.
RuntimeMBeanException (src) - If the class constructor raised a runtime
exception. This exception wraps the actual exception thrown.
RuntimeErrorException (src) - If the class constructor raised an error.
This exception wraps the actual error thrown.
RuntimeOperationsException (src) - if the className argument is null.
Wraps an IllegalArgumentException instance.
public java.io.ObjectInputStream deserialize(ObjectName (src) name,
byte[] data)
throws InstanceNotFoundException (src) ,
OperationsException (src)
getClassLoaderFor(ObjectName) to obtain the
appropriate classloader for deserialization
InstanceNotFoundException (src)
OperationsException (src)
public java.io.ObjectInputStream deserialize(java.lang.String className,
byte[] data)
throws OperationsException (src) ,
ReflectionException (src)
getClassLoaderFor(ObjectName) to obtain the
appropriate classloader for deserialization
OperationsException (src)
ReflectionException (src)
public java.io.ObjectInputStream deserialize(java.lang.String className,
ObjectName (src) loaderName,
byte[] data)
throws InstanceNotFoundException (src) ,
OperationsException (src) ,
ReflectionException (src)
getClassLoaderFor(ObjectName) to obtain the
appropriate classloader for deserialization
InstanceNotFoundException (src)
OperationsException (src)
ReflectionException (src)
public java.lang.ClassLoader getClassLoaderFor(ObjectName (src) name)
throws InstanceNotFoundException (src)
name - the object name of the mbean
InstanceNotFoundException (src) - when the mbean is not registered
public java.lang.ClassLoader getClassLoader(ObjectName (src) name)
throws InstanceNotFoundException (src)
name - the object name of the classloader
InstanceNotFoundException (src) - when the mbean is not registeredpublic ClassLoaderRepository (src) getClassLoaderRepository()
|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||