com.caucho.jmx
Class MBeanContext

java.lang.Object
  extended by com.caucho.jmx.MBeanContext

public class MBeanContext
extends java.lang.Object

The context containing mbeans registered at a particular level.


Nested Class Summary
 class MBeanContext.MBeanClose
           
 
Method Summary
 java.util.LinkedHashMap<java.lang.String,java.lang.String> copyProperties()
          Sets the properties.
 void destroy()
          Closes the context server.
 java.lang.ClassLoader getClassLoader()
          Returns the class loader.
 javax.management.loading.ClassLoaderRepository getClassLoaderRepository()
          Returns the ClassLoaderRepository.
 int getMBeanCount()
          Returns the number of MBeans registered.
 javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name)
          Returns the MBean registered with the given name.
 javax.management.ObjectName getObjectName(java.lang.String name)
          Returns the object name.
protected  MBeanView getParentView()
          Returns the parent view.
 boolean isRegistered(javax.management.ObjectName name)
          Returns true if the given object is registered with the server.
 void removeNotificationListener(javax.management.ObjectName mbean, javax.management.NotificationListener listener)
          Removes a listener to a registered MBean
 void removeNotificationListener(javax.management.ObjectName mbean, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Removes a listener to a registered MBean
 void setProperties(java.util.Map<java.lang.String,java.lang.String> props)
          Sets the properties.
 java.lang.String toString()
          Display name.
 void unregisterMBean(javax.management.ObjectName name)
          Unregisters an MBean from the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getParentView

protected MBeanView getParentView()
Returns the parent view.


getClassLoaderRepository

public javax.management.loading.ClassLoaderRepository getClassLoaderRepository()
Returns the ClassLoaderRepository.


getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns the class loader.


setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.String> props)
Sets the properties.


copyProperties

public java.util.LinkedHashMap<java.lang.String,java.lang.String> copyProperties()
Sets the properties.


getObjectName

public javax.management.ObjectName getObjectName(java.lang.String name)
                                          throws javax.management.MalformedObjectNameException
Returns the object name.

Throws:
javax.management.MalformedObjectNameException

unregisterMBean

public void unregisterMBean(javax.management.ObjectName name)
                     throws javax.management.InstanceNotFoundException,
                            javax.management.MBeanRegistrationException
Unregisters an MBean from the server.

Parameters:
name - the name of the mbean.
Throws:
javax.management.InstanceNotFoundException
javax.management.MBeanRegistrationException

getObjectInstance

public javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name)
                                                  throws javax.management.InstanceNotFoundException
Returns the MBean registered with the given name.

Parameters:
name - the name of the mbean.
Returns:
the matching mbean object.
Throws:
javax.management.InstanceNotFoundException

isRegistered

public boolean isRegistered(javax.management.ObjectName name)
Returns true if the given object is registered with the server.

Parameters:
name - the name of the mbean to test.
Returns:
true if the object is registered.

getMBeanCount

public int getMBeanCount()
Returns the number of MBeans registered.

Returns:
the number of registered mbeans.

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName mbean,
                                       javax.management.NotificationListener listener)
Removes a listener to a registered MBean

Parameters:
mbean - the name of the mbean
listener - the listener object

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName mbean,
                                       javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
Removes a listener to a registered MBean

Parameters:
mbean - the name of the mbean
listener - the listener object
filter - filters events the listener is interested in
handback - context to be returned to the listener

destroy

public void destroy()
Closes the context server.


toString

public java.lang.String toString()
Display name.

Overrides:
toString in class java.lang.Object