org.jmx4odp.j4oNet
Class MBeanServerResolver

java.lang.Object
  extended by org.jmx4odp.j4oNet.MBeanResolver
      extended by org.jmx4odp.j4oNet.MBeanServerResolver
All Implemented Interfaces:
javax.management.MBeanRegistration, MBeanResolverMBean

public class MBeanServerResolver
extends MBeanResolver

This resolver will find MBeans that match criteria in a JmxServiceObj that are registered with an MBeanServer. It uses the org.jmx4odp.jmx.util.RemoteJmxConnectionManager to create a connection to the MBeanServer described in the JmxServiceObj. So this object can look at both remote and local MBeanServers.

Author:
Lucas McGregor

Field Summary
 
Fields inherited from class org.jmx4odp.j4oNet.MBeanResolver
mbeanServer, objectName
 
Constructor Summary
MBeanServerResolver()
          Creates new MBeanServerResolver
 
Method Summary
 JmxServiceObj[] handleAgentRequest(JmxServiceObj jso)
          This method will return an array of the matching JMX Agent as a JSO as the only element in the array
 JmxServiceObj[] handleMBeanRequest(JmxServiceObj jso)
          This method looks for all the JMX MBeans that match the criteria, and place their JSO in an array.
 
Methods inherited from class org.jmx4odp.j4oNet.MBeanResolver
getActive, getCachable, getNameSpace, getThreshHold, inNameSpace, postDeregister, postRegister, preDeregister, preRegister, registered, resolve, setActive, setCachable, setNameSpace, setThreshHold
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanServerResolver

public MBeanServerResolver()
Creates new MBeanServerResolver

Method Detail

handleAgentRequest

public JmxServiceObj[] handleAgentRequest(JmxServiceObj jso)
This method will return an array of the matching JMX Agent as a JSO as the only element in the array

Overrides:
handleAgentRequest in class MBeanResolver

handleMBeanRequest

public JmxServiceObj[] handleMBeanRequest(JmxServiceObj jso)
This method looks for all the JMX MBeans that match the criteria, and place their JSO in an array.

It will step through the JmxServiceObj looking for available data to do a match upon. If the getClassName() is not null, it will find all Mbeans that are an instance of this class.

Else if the getObjectName() is not null, it will find the MBean that matches the ObjectName on the MBeanServer

Once the MBeans have been found, their ObjectInstances are placed into an array of JmxServiceObj's cloned from the one passed in.

Overrides:
handleMBeanRequest in class MBeanResolver