org.jmx4odp.j4oNet
Class JsRegistryManager

java.lang.Object
  extended by org.jmx4odp.j4oNet.JsRegistryManager
All Implemented Interfaces:
javax.management.MBeanRegistration, JsRegistryManagerMBean

public class JsRegistryManager
extends java.lang.Object
implements javax.management.MBeanRegistration, JsRegistryManagerMBean

A coder should not access the JsRegistry directly. Instead, they use this registry manager instead. It contains logic to resolve request from either the local JsRegistry, or any eligible MBeanResolver that is registered and active in the local agent.

The JsRegistryManager contains logic to resolve an MBean or agent using the local JsRegistry or any active and eligible MBeanResolver that is registered with the local agent. If any service is found and the MBeanResolver that finds it is cacheable, the MBean and it's agent will be added to the local JsRegistry.

Author:
Lucas McGregor

Field Summary
 
Fields inherited from interface org.jmx4odp.j4oNet.JsRegistryManagerMBean
CACHED, HIGH_ALL, LOCAL, LOCAL_NET, LOW_ALL, NET
 
Constructor Summary
JsRegistryManager()
          Creates new JsRegistryManager
 
Method Summary
 JmxServiceObj[] fullResolveMBeans(JmxServiceObj jso)
          Use all active resolvers to resolve this jso
 int getHashcode()
           
 JmxServiceObj[] getKnownAgents()
           
 JmxServiceObj[] getKnownMBeans()
          Get a list of the MBeans that have already been discovered and their locations cached in the jsRegistry.
 JmxServiceObj[] localNetResolveMBeans(JmxServiceObj jso)
          LOOK UP THE JSO IN ONLY IN THIS LOCAL NETWORK
 JmxServiceObj[] localResolveMBeans(JmxServiceObj jso)
          LOOK UP THE JSO IN ONLY THIS MBEAN SERVER
 void postDeregister()
           
 void postRegister(java.lang.Boolean booleanParam)
           
 void preDeregister()
           
 javax.management.ObjectName preRegister(javax.management.MBeanServer mBeanServer, javax.management.ObjectName obj)
          Before this object is registered with the JMX agent, it creates its own MBeanServerResolve and egistryResolver
 JmxServiceObj[] resolveJmxService(JmxServiceObj jso, int low, int high)
          LOOK UP THE JSO IN ALL THE REGISTERED MBEANRESOLVERMBEAN'S
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsRegistryManager

public JsRegistryManager()
Creates new JsRegistryManager

Method Detail

getHashcode

public int getHashcode()
Specified by:
getHashcode in interface JsRegistryManagerMBean

localResolveMBeans

public JmxServiceObj[] localResolveMBeans(JmxServiceObj jso)
LOOK UP THE JSO IN ONLY THIS MBEAN SERVER

Specified by:
localResolveMBeans in interface JsRegistryManagerMBean

localNetResolveMBeans

public JmxServiceObj[] localNetResolveMBeans(JmxServiceObj jso)
LOOK UP THE JSO IN ONLY IN THIS LOCAL NETWORK

Specified by:
localNetResolveMBeans in interface JsRegistryManagerMBean

fullResolveMBeans

public JmxServiceObj[] fullResolveMBeans(JmxServiceObj jso)
Use all active resolvers to resolve this jso

Specified by:
fullResolveMBeans in interface JsRegistryManagerMBean

getKnownAgents

public JmxServiceObj[] getKnownAgents()

getKnownMBeans

public JmxServiceObj[] getKnownMBeans()
Get a list of the MBeans that have already been discovered and their locations cached in the jsRegistry.


resolveJmxService

public JmxServiceObj[] resolveJmxService(JmxServiceObj jso,
                                         int low,
                                         int high)
LOOK UP THE JSO IN ALL THE REGISTERED MBEANRESOLVERMBEAN'S

Specified by:
resolveJmxService in interface JsRegistryManagerMBean

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface javax.management.MBeanRegistration

postRegister

public void postRegister(java.lang.Boolean booleanParam)
Specified by:
postRegister in interface javax.management.MBeanRegistration

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Specified by:
preDeregister in interface javax.management.MBeanRegistration
Throws:
java.lang.Exception

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer mBeanServer,
                                               javax.management.ObjectName obj)
                                        throws java.lang.Exception
Before this object is registered with the JMX agent, it creates its own MBeanServerResolve and egistryResolver

Specified by:
preRegister in interface javax.management.MBeanRegistration
Throws:
java.lang.Exception