mx4j.server
Class MBeanServerImpl

java.lang.Object
  |
  +--mx4j.server.MBeanServerImpl
All Implemented Interfaces:
MBeanServer

public class MBeanServerImpl
extends java.lang.Object
implements MBeanServer

MBeanServer implementation.

The MBeanServer accomplishes these roles:


The repository function is delegated to instances of MBeanRepository classes. This class acts as a factory for MBeanRepository instances, that can be controlled via the system property mx4j.mbeanserver.repository set to the qualified name of the implementation class.

This class also acts as an invoker on MBeans. The architecture is interceptor-based, that is whenever you call from a client an MBeanServer method that will end up to call the MBean instance, the call is dispatched to the interceptor chain and eventually to the MBean.
The interceptors are configurable via the MBean MBeanServerInterceptorConfigurator. When the call is about to arrive to the MBean instance, the last interceptor dispatches the call depending on the MBean type: if the MBean is a dynamic MBean, the call is dispatched directly; if the MBean is a standard MBean an MBeanInvoker is delegated to invoke on the MBean instance.

Version:
$Revision: 1.32 $
Author:
Simone Bordet

Constructor Summary
MBeanServerImpl(java.lang.String defaultDomain)
          Create a new MBeanServerImpl with the specified default domain.
 
Method Summary
 void addNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, java.lang.Object handback)
          Add a NotificationListener to a registered MBean Register an MBean listener to allow broadcast of management events(notifications).
 void addNotificationListener(ObjectName observed, ObjectName listener, NotificationFilter filter, java.lang.Object handback)
          Add a NotificationListener to a registered MBean Register an MBean listener to allow broadcast of management events(notifications).
 ObjectInstance createMBean(java.lang.String className, ObjectName objectName)
          Registers an MBean and returns an ObjectInstance.
 ObjectInstance createMBean(java.lang.String className, ObjectName objectName, java.lang.Object[] args, java.lang.String[] parameters)
          Registers an MBean and returns an ObjectInstance
 ObjectInstance createMBean(java.lang.String className, ObjectName objectName, ObjectName loaderName)
          Registers an MBean and returns an ObjectInstance, and use the specified loaderName.
 ObjectInstance createMBean(java.lang.String className, ObjectName objectName, ObjectName loaderName, java.lang.Object[] args, java.lang.String[] parameters)
          Registers an MBean and returns an ObjectInstance using the specified loaderName for the ClassLoader
 java.io.ObjectInputStream deserialize(ObjectName objectName, byte[] bytes)
          Deserialize the specified bytes using the classloader of the MBean registered with the given ObjectName
 java.io.ObjectInputStream deserialize(java.lang.String className, byte[] bytes)
          Deserialize the specified bytes using the classloader that is able to load the specified class.
 java.io.ObjectInputStream deserialize(java.lang.String className, ObjectName loaderName, byte[] bytes)
          Deserialize the given bytes using the classloader that can actually load className using the classloader MBean with the specified ObjectName as initiating classloader.
 java.lang.Object getAttribute(ObjectName objectName, java.lang.String attribute)
          Retrieve an attribute using the given objectName
 AttributeList getAttributes(ObjectName objectName, java.lang.String[] attributes)
           
 java.lang.ClassLoader getClassLoader(ObjectName name)
          Returns a ClassLoader using the ObjectName.
 java.lang.ClassLoader getClassLoaderFor(ObjectName name)
          Returns the ClassLoader used by the MBean for the given ObjectName
 ClassLoaderRepository getClassLoaderRepository()
          Returns the ClassLoaderRepository for this MBeanServer.
 java.lang.String getDefaultDomain()
          Retrieve the default domain of this MBean Server
 java.lang.Integer getMBeanCount()
          Returns the number of MBeans
 MBeanInfo getMBeanInfo(ObjectName objectName)
          Returns an MBeanInfo using the specified objectName
 ObjectInstance getObjectInstance(ObjectName objectName)
          Returns an ObjectInstance using the specified objectName
static ClassLoaderRepository getStaticClassLoaderRepository()
          Returns the ClassLoaderRepository that maps ClassLoaderRepositories of all MBeanServer in a JVM.
 java.lang.Object instantiate(java.lang.String className)
          Instantiate the given className using the default ClassLoaderRepository.
 java.lang.Object instantiate(java.lang.String className, java.lang.Object[] args, java.lang.String[] parameters)
          Instantiate the given className using the given args and parameters using the ClassLoaderRepository
 java.lang.Object instantiate(java.lang.String className, ObjectName loaderName)
          Instantiate the given className using the loaderName as the ClassLoader
 java.lang.Object instantiate(java.lang.String className, ObjectName loaderName, java.lang.Object[] args, java.lang.String[] parameters)
          Instantiate the given className using the ClassLoader (loaderName), args and parameters
 java.lang.Object invoke(ObjectName objectName, java.lang.String methodName, java.lang.Object[] args, java.lang.String[] parameters)
          Invokes/Execute an operation on an MBean
 boolean isInstanceOf(ObjectName objectName, java.lang.String className)
          Checks if the MBean denoted by objectName is of type className
 boolean isRegistered(ObjectName objectName)
          Checks if the specified ObjectName is registered with this MBean Server
 java.util.Set queryMBeans(ObjectName patternName, QueryExp filter)
          Returns the names of all MBeans controlled by the MBean Server using the given patternName and filter.
 java.util.Set queryNames(ObjectName patternName, QueryExp filter)
          Returns the names of all MBeans controlled by the MBean Server using the given patternName and filter.
 ObjectInstance registerMBean(java.lang.Object mbean, ObjectName objectName)
          Register an already created MBean using the specified ObjectName
 void removeNotificationListener(ObjectName observed, NotificationListener listener)
          Removed a notificationListener.
 void removeNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, java.lang.Object handback)
          Not present in the specification but needed
 void removeNotificationListener(ObjectName observed, ObjectName listener)
          Remove a notificationListener.
 void removeNotificationListener(ObjectName observed, ObjectName listener, NotificationFilter filter, java.lang.Object handback)
          Not present in the specification but needed
 void setAttribute(ObjectName objectName, Attribute attribute)
          Sets the vallue of the Attribute of the given MBean
 AttributeList setAttributes(ObjectName objectName, AttributeList attributes)
          Sets the attribute of an MBean
 void unregisterMBean(ObjectName objectName)
          Unregister a registered MBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanServerImpl

public MBeanServerImpl(java.lang.String defaultDomain)
Create a new MBeanServerImpl with the specified default domain. Also registers interceptors to their respective reserved ObjectName

Parameters:
defaultDomain - The default domain to be used
Throws:
java.lang.SecurityException - If access is not granted to create an MBeanServer instance
Method Detail

getStaticClassLoaderRepository

public static ClassLoaderRepository getStaticClassLoaderRepository()
Returns the ClassLoaderRepository that maps ClassLoaderRepositories of all MBeanServer in a JVM.

See Also:
ClassLoaderRepository

getClassLoaderRepository

public ClassLoaderRepository getClassLoaderRepository()
Returns the ClassLoaderRepository for this MBeanServer. When first the ClassLoaderRepository is created in the constructor, the system property mx4j.mbeanserver.classloader.repository it tested; if it is non-null and defines a subclass of BaseClassLoaderRepository, then that class is used instead of the default one.


getClassLoader

public java.lang.ClassLoader getClassLoader(ObjectName name)
                                     throws InstanceNotFoundException
Returns a ClassLoader using the ObjectName. Returns null if the MBean found is not an instance of java.lang.ClassLoader

Parameters:
name - The ObjectName to be used
Returns:
ClassLoader The ClassLoader
Throws:
InstanceNotFoundException - If no instance was found from the MBeanRepository
java.lang.SecurityException - If the ObjectName doesn't have permission to getClassLoader

getClassLoaderFor

public java.lang.ClassLoader getClassLoaderFor(ObjectName name)
                                        throws InstanceNotFoundException
Returns the ClassLoader used by the MBean for the given ObjectName

Parameters:
name - The ObjectName for the MBean
Throws:
InstanceNotFoundException - If no instance was found from the MBeanRepository
java.lang.SecurityException - If the ObjectName doesn't have permission to getClassLoaderFor

deserialize

public java.io.ObjectInputStream deserialize(java.lang.String className,
                                             ObjectName loaderName,
                                             byte[] bytes)
                                      throws InstanceNotFoundException,
                                             OperationsException,
                                             ReflectionException
Deserialize the given bytes using the classloader that can actually load className using the classloader MBean with the specified ObjectName as initiating classloader.

Specified by:
deserialize in interface MBeanServer
Parameters:
className - The className to load
loaderName - The ObjectName of the classloader MBean that initiates the loading of className
bytes - The data to de-serialize
Returns:
ObjectInputStream The de-serialized stream
Throws:
InstanceNotFoundException - If the specified ObjectName does not represent a registered MBean
OperationsException - I/O Related Error
ReflectionException - If className can't be loaded

deserialize

public java.io.ObjectInputStream deserialize(java.lang.String className,
                                             byte[] bytes)
                                      throws OperationsException,
                                             ReflectionException
Deserialize the specified bytes using the classloader that is able to load the specified class. The ClassLoaderRepository of this MBeanServer is used to find the classloader.

Specified by:
deserialize in interface MBeanServer
Parameters:
className - The className used to find a suitable classloader
bytes - The data to de-serialize
Returns:
ObjectInputStream The de-serialized stream
Throws:
OperationsException - I/O Related Error
ReflectionException - If the className cannot be loaded using this MBeanServer's ClassLoaderRepository

deserialize

public java.io.ObjectInputStream deserialize(ObjectName objectName,
                                             byte[] bytes)
                                      throws InstanceNotFoundException,
                                             OperationsException
Deserialize the specified bytes using the classloader of the MBean registered with the given ObjectName

Specified by:
deserialize in interface MBeanServer
Parameters:
objectName - The ObjectName of the MBean whose classloader is used to deserialize
bytes - The data to de-serialize
Returns:
ObjectInputStream The de-serialized stream
Throws:
OperationsException - I/O Related Error
InstanceNotFoundException - If the specified ObjectName does not represent a registered MBean

addNotificationListener

public void addNotificationListener(ObjectName observed,
                                    ObjectName listener,
                                    NotificationFilter filter,
                                    java.lang.Object handback)
                             throws InstanceNotFoundException
Add a NotificationListener to a registered MBean Register an MBean listener to allow broadcast of management events(notifications). The listener should be an instance of NotificationListener. See Page 47 (JMX Notification Model) of the JMX1.1 Agent Specification for details.

Specified by:
addNotificationListener in interface MBeanServer
Parameters:
observed - The observed MBean where the listener is added
listener - Handles notification sent by the observed MBean
filter - Implementation which provides filter to be applied on notifications
handback - Object sent when to the listener
Throws:
InstanceNotFoundException - If the MBean pointed by "listener" is not an instance of NotificationListener
See Also:
NotificationListenerMBeanServerInterceptor

addNotificationListener

public void addNotificationListener(ObjectName observed,
                                    NotificationListener listener,
                                    NotificationFilter filter,
                                    java.lang.Object handback)
                             throws InstanceNotFoundException
Add a NotificationListener to a registered MBean Register an MBean listener to allow broadcast of management events(notifications). The listener should be an instance of NotificationListener. See Page 47 (JMX Notification Model) of the JMX1.1 Agent Specification for details.

Specified by:
addNotificationListener in interface MBeanServer
Parameters:
observed - The observed MBean where the listener is added
listener - Handles notification sent by the observed MBean
filter - Implementation which provides filter to be applied on notifications
handback - Object sent when to the listener
Throws:
InstanceNotFoundException - If the MBean pointed by "listener" is not an instance of NotificationBroadCaster
See Also:
NotificationListenerMBeanServerInterceptor

removeNotificationListener

public void removeNotificationListener(ObjectName observed,
                                       ObjectName listener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Remove a notificationListener.

Specified by:
removeNotificationListener in interface MBeanServer
Parameters:
observed - The observed MBean where the listener is removed
listener - The listener to removed
Throws:
InstanceNotFoundException - If the MBean pointed by "listener" is not an instance of NotificationListener
ListnerNotFoundException - If no specified listener was found
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName observed,
                                       NotificationListener listener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Removed a notificationListener.

Specified by:
removeNotificationListener in interface MBeanServer
Parameters:
observed - The observed MBean where the listener is removed
listener - The listener to removed
Throws:
InstanceNotFoundException - If the MBean pointed by "listener" is not an instance of NotificationListener
ListnerNotFoundException - If no specified listener was found
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName observed,
                                       ObjectName listener,
                                       NotificationFilter filter,
                                       java.lang.Object handback)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Not present in the specification but needed

InstanceNotFoundException
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName observed,
                                       NotificationListener listener,
                                       NotificationFilter filter,
                                       java.lang.Object handback)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Not present in the specification but needed

InstanceNotFoundException
ListenerNotFoundException

instantiate

public java.lang.Object instantiate(java.lang.String className)
                             throws ReflectionException,
                                    MBeanException
Instantiate the given className using the default ClassLoaderRepository.

The class should have a public constructor. Note that the instance created isn't registered with the MBeanServer

Specified by:
instantiate in interface MBeanServer
Parameters:
className - The className to instantiate
Returns:
Object The created instance
Throws:
ReflectionException
MBeanException
java.lang.IllegalArgumentException - If the className is null or 0 length

instantiate

public java.lang.Object instantiate(java.lang.String className,
                                    java.lang.Object[] args,
                                    java.lang.String[] parameters)
                             throws ReflectionException,
                                    MBeanException
Instantiate the given className using the given args and parameters using the ClassLoaderRepository

The class should have a public constructor. Note that the instance created isn't registered with the MBeanServer

Specified by:
instantiate in interface MBeanServer
Parameters:
className - The className to instantiate
args - The argument as an array
parameters - The parameters as an array
Returns:
Object The created instance
Throws:
ReflectionException
MBeanException
java.lang.IllegalArgumentException - If the className is null or 0 length

instantiate

public java.lang.Object instantiate(java.lang.String className,
                                    ObjectName loaderName)
                             throws ReflectionException,
                                    MBeanException,
                                    InstanceNotFoundException
Instantiate the given className using the loaderName as the ClassLoader

The class should have a public constructor. Note that the instance created isn't registered with the MBeanServer

Specified by:
instantiate in interface MBeanServer
Parameters:
className - The className to instantiate
loaderName - The MBean loaderName to use
Returns:
Object The created instance
Throws:
ReflectionException
MBeanException
InstanceNotFoundException - If the className is null or 0 length

instantiate

public java.lang.Object instantiate(java.lang.String className,
                                    ObjectName loaderName,
                                    java.lang.Object[] args,
                                    java.lang.String[] parameters)
                             throws ReflectionException,
                                    MBeanException,
                                    InstanceNotFoundException
Instantiate the given className using the ClassLoader (loaderName), args and parameters

Specified by:
instantiate in interface MBeanServer
Parameters:
className - The className to instantiate
loaderName - The MBean loaderName to use
args - The argument as an array
parameters - The parameters as an array
Returns:
Object The created instance
Throws:
ReflectionException
MBeanException
InstanceNotFoundException - If the className is null or 0 length

createMBean

public ObjectInstance createMBean(java.lang.String className,
                                  ObjectName objectName)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Registers an MBean and returns an ObjectInstance.

The MBeanServer will use the default ClassLoaderRepository

Specified by:
createMBean in interface MBeanServer
Parameters:
className - The classname of the MBean
objectName - The given objectName
Returns:
ObjectInstance The ObjectInstance created
Throws:
ReflectionException
InstanceAlreadyExistsException - If an instance already exists in the MBeanServer
MBeanRegistrationException
MBeanException
NotCompliantMBeanException - If not an MBean

createMBean

public ObjectInstance createMBean(java.lang.String className,
                                  ObjectName objectName,
                                  java.lang.Object[] args,
                                  java.lang.String[] parameters)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Registers an MBean and returns an ObjectInstance

The MBeanServer will use the default ClassLoaderRepository

Specified by:
createMBean in interface MBeanServer
Parameters:
className - The classname of the MBean
objectName - The given objectName
args - The arguments as array
parameters - The parameters as array
Returns:
ObjectInstance The ObjectInstance created
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException

createMBean

public ObjectInstance createMBean(java.lang.String className,
                                  ObjectName objectName,
                                  ObjectName loaderName)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Registers an MBean and returns an ObjectInstance, and use the specified loaderName.

Specified by:
createMBean in interface MBeanServer
Parameters:
className - The classname of the MBean
objectName - The objectname
loaderName - The ObjectName of the loader
Returns:
ObjectInstance The ObjectInstance created
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException
InstanceNotFoundException
MBeanException

createMBean

public ObjectInstance createMBean(java.lang.String className,
                                  ObjectName objectName,
                                  ObjectName loaderName,
                                  java.lang.Object[] args,
                                  java.lang.String[] parameters)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Registers an MBean and returns an ObjectInstance using the specified loaderName for the ClassLoader

The MBeanServer will use the default ClassLoaderRepository

Specified by:
createMBean in interface MBeanServer
Parameters:
className - The classname of the MBean
objectName - The given objectName
args - The arguments as array
parameters - The parameters as array
Returns:
ObjectInstance The ObjectInstance created
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException - If error on instantiating the MBean
InstanceNotFoundException - If the loaderName wasn't found
NotCompliantMBeanException

registerMBean

public ObjectInstance registerMBean(java.lang.Object mbean,
                                    ObjectName objectName)
                             throws InstanceAlreadyExistsException,
                                    MBeanRegistrationException,
                                    NotCompliantMBeanException
Register an already created MBean using the specified ObjectName

Specified by:
registerMBean in interface MBeanServer
Parameters:
mbean - The instance of the MBean to register
objectName - The ObjectName to use
Throws:
InstanceAlreadyExistsException - If the MBean already exists
MBeanRegistrationException - Error in registering the MBean
NotCompliantMBeanException - If not a compliant MBean
java.lang.IllegalArgumentException - if the MBean object is null

unregisterMBean

public void unregisterMBean(ObjectName objectName)
                     throws InstanceNotFoundException,
                            MBeanRegistrationException
Unregister a registered MBean

Specified by:
unregisterMBean in interface MBeanServer
Parameters:
objectName - The objectName where the MBean to unregister is bound
Throws:
InstanceNotFoundException - If no instance was found
MBeanRegistrationException

getAttribute

public java.lang.Object getAttribute(ObjectName objectName,
                                     java.lang.String attribute)
                              throws InstanceNotFoundException,
                                     MBeanException,
                                     AttributeNotFoundException,
                                     ReflectionException
Retrieve an attribute using the given objectName

Specified by:
getAttribute in interface MBeanServer
Parameters:
objectName - The objectName of the registered MBean
attribute - The name of the attribute to retrieve
Returns:
Object The attribute
Throws:
InstanceNotFoundException - If no instance was found
MBeanException
AttributeNotFoundException - If the attribute wasn't found
ReflectionException

setAttribute

public void setAttribute(ObjectName objectName,
                         Attribute attribute)
                  throws InstanceNotFoundException,
                         AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Sets the vallue of the Attribute of the given MBean

Specified by:
setAttribute in interface MBeanServer
Parameters:
objectName - the objectName to use
attribute - the attribute to set
Throws:
InstanceNotFoundException - No instance was found
InvalidAttributeValueException - If the attribute was invalid
MBeanException - The exception thrown
ReflectionException
AttributeNotFoundException

getAttributes

public AttributeList getAttributes(ObjectName objectName,
                                   java.lang.String[] attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Specified by:
getAttributes in interface MBeanServer
InstanceNotFoundException
ReflectionException

setAttributes

public AttributeList setAttributes(ObjectName objectName,
                                   AttributeList attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Sets the attribute of an MBean

Specified by:
setAttributes in interface MBeanServer
Parameters:
objectName - the objectName
attributes - The attributes to set
Returns:
AttributeList the attributelist that were set with new values
Throws:
InstanceNotFoundException - If the MBean wasn't found
ReflectionException

invoke

public java.lang.Object invoke(ObjectName objectName,
                               java.lang.String methodName,
                               java.lang.Object[] args,
                               java.lang.String[] parameters)
                        throws InstanceNotFoundException,
                               MBeanException,
                               ReflectionException
Invokes/Execute an operation on an MBean

Specified by:
invoke in interface MBeanServer
Parameters:
objectName - The objectName to use
methodName - the name of the method to invoke
args - the arguments
parameters - the parameters
Returns:
Object The result of invocation
Throws:
InstanceNotFoundException - If the MBean wasn't found
MBeanException
ReflectionException

getDefaultDomain

public java.lang.String getDefaultDomain()
Retrieve the default domain of this MBean Server

Specified by:
getDefaultDomain in interface MBeanServer
Returns:
String the default domain

getMBeanCount

public java.lang.Integer getMBeanCount()
Returns the number of MBeans

Specified by:
getMBeanCount in interface MBeanServer
Returns:
Integer The number of MBeans registered

isRegistered

public boolean isRegistered(ObjectName objectName)
Checks if the specified ObjectName is registered with this MBean Server

Specified by:
isRegistered in interface MBeanServer
Parameters:
objectName - The objectName to check
Returns:
boolean true if registered

getMBeanInfo

public MBeanInfo getMBeanInfo(ObjectName objectName)
                       throws InstanceNotFoundException,
                              IntrospectionException,
                              ReflectionException
Returns an MBeanInfo using the specified objectName

Specified by:
getMBeanInfo in interface MBeanServer
Parameters:
objectName - The objectName to use for the MBeanInfo
Returns:
MBeanInfo The MBeanInfo object
Throws:
InstanceNotFoundException - If no instance was found
IntrospectionException
ReflectionException

getObjectInstance

public ObjectInstance getObjectInstance(ObjectName objectName)
                                 throws InstanceNotFoundException
Returns an ObjectInstance using the specified objectName

Specified by:
getObjectInstance in interface MBeanServer
Parameters:
objectName - The object where the ObjectInstance is registered.
Returns:
ObjectInstance The objectinstance
Throws:
InstanceNotFoundException - If no MBean is registered with the given objectName

isInstanceOf

public boolean isInstanceOf(ObjectName objectName,
                            java.lang.String className)
                     throws InstanceNotFoundException
Checks if the MBean denoted by objectName is of type className

Specified by:
isInstanceOf in interface MBeanServer
Parameters:
objectName - The objectName to check
className - the className as String
Returns:
boolean The result
Throws:
InstanceNotFoundException - If no MBean was found using ObjectName

queryMBeans

public java.util.Set queryMBeans(ObjectName patternName,
                                 QueryExp filter)
Returns the names of all MBeans controlled by the MBean Server using the given patternName and filter.

Specified by:
queryMBeans in interface MBeanServer
Parameters:
patternName - The pattern to use
filter - The filter to use
Returns:
Set A set containing ObjectInstance. Empty if no ObjectInstance was found

queryNames

public java.util.Set queryNames(ObjectName patternName,
                                QueryExp filter)
Returns the names of all MBeans controlled by the MBean Server using the given patternName and filter.

Specified by:
queryNames in interface MBeanServer
Parameters:
patternName - The pattern to use
filter - the filter to use
Returns:
Set A set containing ObjectNames. Empty if no ObjectNames was found


Copyright © 2001-2002 MX4J Team. All Rights Reserved.