org.apache.geronimo.system.jmx
Class KernelMBeanServer

java.lang.Object
  extended by org.apache.geronimo.system.jmx.KernelMBeanServer
All Implemented Interfaces:
MBeanServer, MBeanServerConnection

public class KernelMBeanServer
extends Object
implements MBeanServer

A fake MBeanServer that delegates to a Kernel.


Constructor Summary
KernelMBeanServer(Kernel kernel)
           
 
Method Summary
 void addNotificationListener(ObjectName objectName, NotificationListener notificationListener, NotificationFilter notificationFilter, Object o)
           
 void addNotificationListener(ObjectName objectName, ObjectName objectName1, NotificationFilter notificationFilter, Object o)
           
 ObjectInstance createMBean(String s, ObjectName objectName)
           
 ObjectInstance createMBean(String s, ObjectName objectName, Object[] objects, String[] strings)
           
 ObjectInstance createMBean(String s, ObjectName objectName, ObjectName objectName1)
           
 ObjectInstance createMBean(String s, ObjectName objectName, ObjectName objectName1, Object[] objects, String[] strings)
           
 ObjectInputStream deserialize(ObjectName objectName, byte[] bytes)
           
 ObjectInputStream deserialize(String s, byte[] bytes)
           
 ObjectInputStream deserialize(String s, ObjectName objectName, byte[] bytes)
           
 void doFail()
           
 void doStart()
           
 void doStop()
           
 AbstractName getAbstractNameFor(ObjectName objectName)
           
 Object getAttribute(ObjectName name, String attribute)
           
 AttributeList getAttributes(ObjectName name, String[] attributes)
           
 ClassLoader getClassLoader(ObjectName objectName)
           
 ClassLoader getClassLoaderFor(ObjectName objectName)
           
 ClassLoaderRepository getClassLoaderRepository()
           
 String getDefaultDomain()
           
 String[] getDomains()
           
 Integer getMBeanCount()
           
 MBeanInfo getMBeanInfo(ObjectName name)
           
 ObjectInstance getObjectInstance(ObjectName objectName)
           
 Object instantiate(String s)
           
 Object instantiate(String s, Object[] objects, String[] strings)
           
 Object instantiate(String s, ObjectName objectName)
           
 Object instantiate(String s, ObjectName objectName, Object[] objects, String[] strings)
           
 Object invoke(ObjectName name, String operationName, Object[] params, String[] signature)
           
 boolean isInstanceOf(ObjectName objectName, String s)
           
 boolean isRegistered(ObjectName name)
           
 Set queryMBeans(ObjectName pattern, QueryExp query)
           
 Set queryNames(ObjectName pattern, QueryExp query)
           
 ObjectInstance registerMBean(Object o, ObjectName objectName)
           
 void removeNotificationListener(ObjectName objectName, NotificationListener notificationListener)
           
 void removeNotificationListener(ObjectName objectName, NotificationListener notificationListener, NotificationFilter notificationFilter, Object o)
           
 void removeNotificationListener(ObjectName objectName, ObjectName objectName1)
           
 void removeNotificationListener(ObjectName objectName, ObjectName objectName1, NotificationFilter notificationFilter, Object o)
           
 void setAttribute(ObjectName name, Attribute attribute)
           
 AttributeList setAttributes(ObjectName name, AttributeList attributes)
           
 AbstractName toAbstractName(ObjectName objectName)
           
 void unregisterMBean(ObjectName objectName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KernelMBeanServer

public KernelMBeanServer(Kernel kernel)
Method Detail

doStart

public void doStart()

getAbstractNameFor

public AbstractName getAbstractNameFor(ObjectName objectName)

doFail

public void doFail()

doStop

public void doStop()

toAbstractName

public AbstractName toAbstractName(ObjectName objectName)
                            throws InstanceNotFoundException
Throws:
InstanceNotFoundException

getAttribute

public Object getAttribute(ObjectName name,
                           String attribute)
                    throws MBeanException,
                           AttributeNotFoundException,
                           InstanceNotFoundException,
                           ReflectionException
Specified by:
getAttribute in interface MBeanServer
Specified by:
getAttribute in interface MBeanServerConnection
Throws:
MBeanException
AttributeNotFoundException
InstanceNotFoundException
ReflectionException

getAttributes

public AttributeList getAttributes(ObjectName name,
                                   String[] attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Specified by:
getAttributes in interface MBeanServer
Specified by:
getAttributes in interface MBeanServerConnection
Throws:
InstanceNotFoundException
ReflectionException

getDefaultDomain

public String getDefaultDomain()
Specified by:
getDefaultDomain in interface MBeanServer
Specified by:
getDefaultDomain in interface MBeanServerConnection

getMBeanCount

public Integer getMBeanCount()
Specified by:
getMBeanCount in interface MBeanServer
Specified by:
getMBeanCount in interface MBeanServerConnection

getMBeanInfo

public MBeanInfo getMBeanInfo(ObjectName name)
                       throws InstanceNotFoundException,
                              ReflectionException
Specified by:
getMBeanInfo in interface MBeanServer
Specified by:
getMBeanInfo in interface MBeanServerConnection
Throws:
InstanceNotFoundException
ReflectionException

invoke

public Object invoke(ObjectName name,
                     String operationName,
                     Object[] params,
                     String[] signature)
              throws InstanceNotFoundException,
                     MBeanException,
                     ReflectionException
Specified by:
invoke in interface MBeanServer
Specified by:
invoke in interface MBeanServerConnection
Throws:
InstanceNotFoundException
MBeanException
ReflectionException

isRegistered

public boolean isRegistered(ObjectName name)
Specified by:
isRegistered in interface MBeanServer
Specified by:
isRegistered in interface MBeanServerConnection

queryNames

public Set queryNames(ObjectName pattern,
                      QueryExp query)
Specified by:
queryNames in interface MBeanServer
Specified by:
queryNames in interface MBeanServerConnection

queryMBeans

public Set queryMBeans(ObjectName pattern,
                       QueryExp query)
Specified by:
queryMBeans in interface MBeanServer
Specified by:
queryMBeans in interface MBeanServerConnection

setAttribute

public void setAttribute(ObjectName name,
                         Attribute attribute)
                  throws InstanceNotFoundException,
                         AttributeNotFoundException,
                         MBeanException
Specified by:
setAttribute in interface MBeanServer
Specified by:
setAttribute in interface MBeanServerConnection
Throws:
InstanceNotFoundException
AttributeNotFoundException
MBeanException

setAttributes

public AttributeList setAttributes(ObjectName name,
                                   AttributeList attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Specified by:
setAttributes in interface MBeanServer
Specified by:
setAttributes in interface MBeanServerConnection
Throws:
InstanceNotFoundException
ReflectionException

getDomains

public String[] getDomains()
Specified by:
getDomains in interface MBeanServer
Specified by:
getDomains in interface MBeanServerConnection

getObjectInstance

public ObjectInstance getObjectInstance(ObjectName objectName)
                                 throws InstanceNotFoundException
Specified by:
getObjectInstance in interface MBeanServer
Specified by:
getObjectInstance in interface MBeanServerConnection
Throws:
InstanceNotFoundException

getClassLoaderFor

public ClassLoader getClassLoaderFor(ObjectName objectName)
                              throws InstanceNotFoundException
Specified by:
getClassLoaderFor in interface MBeanServer
Throws:
InstanceNotFoundException

addNotificationListener

public void addNotificationListener(ObjectName objectName,
                                    NotificationListener notificationListener,
                                    NotificationFilter notificationFilter,
                                    Object o)
                             throws InstanceNotFoundException
Specified by:
addNotificationListener in interface MBeanServer
Specified by:
addNotificationListener in interface MBeanServerConnection
Throws:
InstanceNotFoundException

addNotificationListener

public void addNotificationListener(ObjectName objectName,
                                    ObjectName objectName1,
                                    NotificationFilter notificationFilter,
                                    Object o)
                             throws InstanceNotFoundException
Specified by:
addNotificationListener in interface MBeanServer
Specified by:
addNotificationListener in interface MBeanServerConnection
Throws:
InstanceNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName objectName,
                                       ObjectName objectName1)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Throws:
InstanceNotFoundException
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName objectName,
                                       NotificationListener notificationListener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Throws:
InstanceNotFoundException
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName objectName,
                                       ObjectName objectName1,
                                       NotificationFilter notificationFilter,
                                       Object o)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Throws:
InstanceNotFoundException
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName objectName,
                                       NotificationListener notificationListener,
                                       NotificationFilter notificationFilter,
                                       Object o)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Throws:
InstanceNotFoundException
ListenerNotFoundException

isInstanceOf

public boolean isInstanceOf(ObjectName objectName,
                            String s)
                     throws InstanceNotFoundException
Specified by:
isInstanceOf in interface MBeanServer
Specified by:
isInstanceOf in interface MBeanServerConnection
Throws:
InstanceNotFoundException

createMBean

public ObjectInstance createMBean(String s,
                                  ObjectName objectName)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException

createMBean

public ObjectInstance createMBean(String s,
                                  ObjectName objectName,
                                  ObjectName objectName1)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException

createMBean

public ObjectInstance createMBean(String s,
                                  ObjectName objectName,
                                  Object[] objects,
                                  String[] strings)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException

createMBean

public ObjectInstance createMBean(String s,
                                  ObjectName objectName,
                                  ObjectName objectName1,
                                  Object[] objects,
                                  String[] strings)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException

instantiate

public Object instantiate(String s)
                   throws ReflectionException,
                          MBeanException
Specified by:
instantiate in interface MBeanServer
Throws:
ReflectionException
MBeanException

instantiate

public Object instantiate(String s,
                          ObjectName objectName)
                   throws ReflectionException,
                          MBeanException,
                          InstanceNotFoundException
Specified by:
instantiate in interface MBeanServer
Throws:
ReflectionException
MBeanException
InstanceNotFoundException

instantiate

public Object instantiate(String s,
                          Object[] objects,
                          String[] strings)
                   throws ReflectionException,
                          MBeanException
Specified by:
instantiate in interface MBeanServer
Throws:
ReflectionException
MBeanException

instantiate

public Object instantiate(String s,
                          ObjectName objectName,
                          Object[] objects,
                          String[] strings)
                   throws ReflectionException,
                          MBeanException,
                          InstanceNotFoundException
Specified by:
instantiate in interface MBeanServer
Throws:
ReflectionException
MBeanException
InstanceNotFoundException

registerMBean

public ObjectInstance registerMBean(Object o,
                                    ObjectName objectName)
                             throws InstanceAlreadyExistsException,
                                    MBeanRegistrationException,
                                    NotCompliantMBeanException
Specified by:
registerMBean in interface MBeanServer
Throws:
InstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException

deserialize

public ObjectInputStream deserialize(String s,
                                     ObjectName objectName,
                                     byte[] bytes)
                              throws InstanceNotFoundException,
                                     OperationsException,
                                     ReflectionException
Specified by:
deserialize in interface MBeanServer
Throws:
InstanceNotFoundException
OperationsException
ReflectionException

deserialize

public ObjectInputStream deserialize(String s,
                                     byte[] bytes)
                              throws OperationsException,
                                     ReflectionException
Specified by:
deserialize in interface MBeanServer
Throws:
OperationsException
ReflectionException

deserialize

public ObjectInputStream deserialize(ObjectName objectName,
                                     byte[] bytes)
                              throws InstanceNotFoundException,
                                     OperationsException
Specified by:
deserialize in interface MBeanServer
Throws:
InstanceNotFoundException
OperationsException

getClassLoader

public ClassLoader getClassLoader(ObjectName objectName)
                           throws InstanceNotFoundException
Specified by:
getClassLoader in interface MBeanServer
Throws:
InstanceNotFoundException

getClassLoaderRepository

public ClassLoaderRepository getClassLoaderRepository()
Specified by:
getClassLoaderRepository in interface MBeanServer

unregisterMBean

public void unregisterMBean(ObjectName objectName)
                     throws InstanceNotFoundException,
                            MBeanRegistrationException
Specified by:
unregisterMBean in interface MBeanServer
Specified by:
unregisterMBean in interface MBeanServerConnection
Throws:
InstanceNotFoundException
MBeanRegistrationException


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.