JBossMX Parent POM 6.0.0.GA

org.jboss.jmx.mbeanserver
Class JBossMBeanServer

java.lang.Object
  extended by org.jboss.jmx.mbeanserver.DelegateMBeanServer
      extended by org.jboss.jmx.mbeanserver.JBossMBeanServer
All Implemented Interfaces:
MBeanServer, MBeanServerConnection

public class JBossMBeanServer
extends DelegateMBeanServer

JBossMBeanServer.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Field Summary
static ObjectName REGISTRY_NAME
          The new registry name
 
Constructor Summary
JBossMBeanServer(DelegateState state)
          Create a new JBossMBeanServer.
 
Method Summary
 void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
           
 void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
           
protected  org.jboss.jmx.mbeanserver.RegistryEntry checkCurrent(ObjectName name, ClassLoader cl)
          Check current
 ObjectInstance createMBean(String className, ObjectName name)
           
 ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature)
           
 ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName)
           
 ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature)
           
 ObjectInputStream deserialize(ObjectName name, byte[] data)
          Deprecated. 
 ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data)
          Deprecated. 
 Object getAttribute(ObjectName name, String attribute)
           
 AttributeList getAttributes(ObjectName name, String[] attributes)
           
 ClassLoader getClassLoader(ObjectName loaderName)
           
 ClassLoader getClassLoaderFor(ObjectName mbeanName)
           
 MBeanInfo getMBeanInfo(ObjectName name)
           
 ObjectInstance getObjectInstance(ObjectName name)
           
protected  ClassLoader getTCL(ObjectName name)
          Get the thread context classloader for an mbean
 Object instantiate(String className)
           
 Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature)
           
 Object invoke(ObjectName name, String operationName, Object[] params, String[] signature)
           
 boolean isInstanceOf(ObjectName name, String className)
           
 boolean isRegistered(ObjectName name)
           
protected  ObjectName mapObjectName(ObjectName name)
          Map an object name
protected  void register(ObjectInstance instance, ObjectName loaderName)
          Register an instance
 ObjectInstance registerMBean(Object object, ObjectName name)
           
 void removeNotificationListener(ObjectName name, NotificationListener listener)
           
 void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
           
 void removeNotificationListener(ObjectName name, ObjectName listener)
           
 void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
           
protected  void restoreCurrent(org.jboss.jmx.mbeanserver.RegistryEntry previous)
          Restore the current entry
 void setAttribute(ObjectName name, Attribute attribute)
           
 AttributeList setAttributes(ObjectName name, AttributeList attributes)
           
protected  void setNext(MBeanServer next)
          Set the next.
protected  void unregister(ObjectName name)
          Unregister an instance
 void unregisterMBean(ObjectName name)
           
 
Methods inherited from class org.jboss.jmx.mbeanserver.DelegateMBeanServer
deserialize, getClassLoaderRepository, getDefaultDomain, getDelegate, getDomains, getMBeanCount, getNext, getOuter, getState, instantiate, instantiate, queryMBeans, queryNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGISTRY_NAME

public static ObjectName REGISTRY_NAME
The new registry name

Constructor Detail

JBossMBeanServer

public JBossMBeanServer(DelegateState state)
Create a new JBossMBeanServer.

Parameters:
state - the state
Method Detail

getMBeanInfo

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

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
Overrides:
getAttribute in class DelegateMBeanServer
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
Overrides:
getAttributes in class DelegateMBeanServer
Throws:
InstanceNotFoundException
ReflectionException

setAttribute

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

setAttributes

public AttributeList setAttributes(ObjectName name,
                                   AttributeList attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Specified by:
setAttributes in interface MBeanServer
Specified by:
setAttributes in interface MBeanServerConnection
Overrides:
setAttributes in class DelegateMBeanServer
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
Overrides:
invoke in class DelegateMBeanServer
Throws:
InstanceNotFoundException
MBeanException
ReflectionException

registerMBean

public ObjectInstance registerMBean(Object object,
                                    ObjectName name)
                             throws InstanceAlreadyExistsException,
                                    MBeanRegistrationException,
                                    NotCompliantMBeanException
Specified by:
registerMBean in interface MBeanServer
Overrides:
registerMBean in class DelegateMBeanServer
Throws:
InstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException

unregisterMBean

public void unregisterMBean(ObjectName name)
                     throws InstanceNotFoundException,
                            MBeanRegistrationException
Specified by:
unregisterMBean in interface MBeanServer
Specified by:
unregisterMBean in interface MBeanServerConnection
Overrides:
unregisterMBean in class DelegateMBeanServer
Throws:
InstanceNotFoundException
MBeanRegistrationException

createMBean

public ObjectInstance createMBean(String className,
                                  ObjectName name,
                                  Object[] params,
                                  String[] signature)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Overrides:
createMBean in class DelegateMBeanServer
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException

createMBean

public ObjectInstance createMBean(String className,
                                  ObjectName name,
                                  ObjectName loaderName,
                                  Object[] params,
                                  String[] signature)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Overrides:
createMBean in class DelegateMBeanServer
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException

createMBean

public ObjectInstance createMBean(String className,
                                  ObjectName name,
                                  ObjectName loaderName)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Overrides:
createMBean in class DelegateMBeanServer
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException

createMBean

public ObjectInstance createMBean(String className,
                                  ObjectName name)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Overrides:
createMBean in class DelegateMBeanServer
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException

instantiate

public Object instantiate(String className,
                          ObjectName loaderName,
                          Object[] params,
                          String[] signature)
                   throws ReflectionException,
                          MBeanException,
                          InstanceNotFoundException
Specified by:
instantiate in interface MBeanServer
Overrides:
instantiate in class DelegateMBeanServer
Throws:
ReflectionException
MBeanException
InstanceNotFoundException

instantiate

public Object instantiate(String className)
                   throws ReflectionException,
                          MBeanException
Specified by:
instantiate in interface MBeanServer
Overrides:
instantiate in class DelegateMBeanServer
Throws:
ReflectionException
MBeanException

getObjectInstance

public ObjectInstance getObjectInstance(ObjectName name)
                                 throws InstanceNotFoundException
Specified by:
getObjectInstance in interface MBeanServer
Specified by:
getObjectInstance in interface MBeanServerConnection
Overrides:
getObjectInstance in class DelegateMBeanServer
Throws:
InstanceNotFoundException

isInstanceOf

public boolean isInstanceOf(ObjectName name,
                            String className)
                     throws InstanceNotFoundException
Specified by:
isInstanceOf in interface MBeanServer
Specified by:
isInstanceOf in interface MBeanServerConnection
Overrides:
isInstanceOf in class DelegateMBeanServer
Throws:
InstanceNotFoundException

isRegistered

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

addNotificationListener

public void addNotificationListener(ObjectName name,
                                    NotificationListener listener,
                                    NotificationFilter filter,
                                    Object handback)
                             throws InstanceNotFoundException
Specified by:
addNotificationListener in interface MBeanServer
Specified by:
addNotificationListener in interface MBeanServerConnection
Overrides:
addNotificationListener in class DelegateMBeanServer
Throws:
InstanceNotFoundException

addNotificationListener

public void addNotificationListener(ObjectName name,
                                    ObjectName listener,
                                    NotificationFilter filter,
                                    Object handback)
                             throws InstanceNotFoundException
Specified by:
addNotificationListener in interface MBeanServer
Specified by:
addNotificationListener in interface MBeanServerConnection
Overrides:
addNotificationListener in class DelegateMBeanServer
Throws:
InstanceNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName name,
                                       NotificationListener listener,
                                       NotificationFilter filter,
                                       Object handback)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Overrides:
removeNotificationListener in class DelegateMBeanServer
Throws:
InstanceNotFoundException
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName name,
                                       NotificationListener listener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Overrides:
removeNotificationListener in class DelegateMBeanServer
Throws:
InstanceNotFoundException
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName name,
                                       ObjectName listener,
                                       NotificationFilter filter,
                                       Object handback)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Overrides:
removeNotificationListener in class DelegateMBeanServer
Throws:
InstanceNotFoundException
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName name,
                                       ObjectName listener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Overrides:
removeNotificationListener in class DelegateMBeanServer
Throws:
InstanceNotFoundException
ListenerNotFoundException

getClassLoader

public ClassLoader getClassLoader(ObjectName loaderName)
                           throws InstanceNotFoundException
Specified by:
getClassLoader in interface MBeanServer
Overrides:
getClassLoader in class DelegateMBeanServer
Throws:
InstanceNotFoundException

getClassLoaderFor

public ClassLoader getClassLoaderFor(ObjectName mbeanName)
                              throws InstanceNotFoundException
Specified by:
getClassLoaderFor in interface MBeanServer
Overrides:
getClassLoaderFor in class DelegateMBeanServer
Throws:
InstanceNotFoundException

deserialize

@Deprecated
public ObjectInputStream deserialize(ObjectName name,
                                                byte[] data)
                              throws InstanceNotFoundException,
                                     OperationsException
Deprecated. 

Specified by:
deserialize in interface MBeanServer
Overrides:
deserialize in class DelegateMBeanServer
Throws:
InstanceNotFoundException
OperationsException

deserialize

@Deprecated
public ObjectInputStream deserialize(String className,
                                                ObjectName loaderName,
                                                byte[] data)
                              throws InstanceNotFoundException,
                                     OperationsException,
                                     ReflectionException
Deprecated. 

Specified by:
deserialize in interface MBeanServer
Overrides:
deserialize in class DelegateMBeanServer
Throws:
InstanceNotFoundException
OperationsException
ReflectionException

checkCurrent

protected org.jboss.jmx.mbeanserver.RegistryEntry checkCurrent(ObjectName name,
                                                               ClassLoader cl)
Check current

Parameters:
name - the current name
cl - the classloader
Returns:
any previous current

restoreCurrent

protected void restoreCurrent(org.jboss.jmx.mbeanserver.RegistryEntry previous)
Restore the current entry

Parameters:
previous - any previous current

register

protected void register(ObjectInstance instance,
                        ObjectName loaderName)
                 throws InstanceAlreadyExistsException
Register an instance

Parameters:
instance - the instance
loaderName - the laoder name
Throws:
InstanceAlreadyExistsException - if already registered

unregister

protected void unregister(ObjectName name)
                   throws InstanceNotFoundException
Unregister an instance

Parameters:
name - the name to remove
Throws:
InstanceNotFoundException - when the instance is not found

getTCL

protected ClassLoader getTCL(ObjectName name)
                      throws InstanceNotFoundException
Get the thread context classloader for an mbean

Parameters:
name - the name of the mbean
Returns:
the context classloader
Throws:
InstanceNotFoundException - if the name is not registered

mapObjectName

protected ObjectName mapObjectName(ObjectName name)
Map an object name

Parameters:
name - the name
Returns:
the mapped name

setNext

protected void setNext(MBeanServer next)
Description copied from class: DelegateMBeanServer
Set the next.

Overrides:
setNext in class DelegateMBeanServer
Parameters:
next - the next.

JBossMX Parent POM 6.0.0.GA

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.