Package org.jboss.as.jmx
Class AuthorizingMBeanServer
- java.lang.Object
-
- org.jboss.as.jmx.AuthorizingMBeanServer
-
- All Implemented Interfaces:
MBeanServer,MBeanServerConnection
public final class AuthorizingMBeanServer extends Object implements MBeanServer
A wrapper aroundMBeanServerto switch on authorization for all calls.- Author:
- Darran Lofthouse
-
-
Method Summary
-
-
-
Method Detail
-
wrap
public static MBeanServer wrap(MBeanServer delegate)
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
- Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
- Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionInstanceNotFoundException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
- Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
- Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionInstanceNotFoundException
-
registerMBean
public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException
- Specified by:
registerMBeanin interfaceMBeanServer- Throws:
InstanceAlreadyExistsExceptionMBeanRegistrationExceptionNotCompliantMBeanException
-
unregisterMBean
public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException
- Specified by:
unregisterMBeanin interfaceMBeanServer- Specified by:
unregisterMBeanin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionMBeanRegistrationException
-
getObjectInstance
public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException
- Specified by:
getObjectInstancein interfaceMBeanServer- Specified by:
getObjectInstancein interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
queryMBeans
public Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query)
- Specified by:
queryMBeansin interfaceMBeanServer- Specified by:
queryMBeansin interfaceMBeanServerConnection
-
queryNames
public Set<ObjectName> queryNames(ObjectName name, QueryExp query)
- Specified by:
queryNamesin interfaceMBeanServer- Specified by:
queryNamesin interfaceMBeanServerConnection
-
isRegistered
public boolean isRegistered(ObjectName name)
- Specified by:
isRegisteredin interfaceMBeanServer- Specified by:
isRegisteredin interfaceMBeanServerConnection
-
getMBeanCount
public Integer getMBeanCount()
- Specified by:
getMBeanCountin interfaceMBeanServer- Specified by:
getMBeanCountin interfaceMBeanServerConnection
-
getAttribute
public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException
- Specified by:
getAttributein interfaceMBeanServer- Specified by:
getAttributein interfaceMBeanServerConnection- Throws:
MBeanExceptionAttributeNotFoundExceptionInstanceNotFoundExceptionReflectionException
-
getAttributes
public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException
- Specified by:
getAttributesin interfaceMBeanServer- Specified by:
getAttributesin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionReflectionException
-
setAttribute
public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
- Specified by:
setAttributein interfaceMBeanServer- Specified by:
setAttributein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionException
-
setAttributes
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException
- Specified by:
setAttributesin interfaceMBeanServer- Specified by:
setAttributesin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionReflectionException
-
invoke
public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException
- Specified by:
invokein interfaceMBeanServer- Specified by:
invokein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionMBeanExceptionReflectionException
-
getDefaultDomain
public String getDefaultDomain()
- Specified by:
getDefaultDomainin interfaceMBeanServer- Specified by:
getDefaultDomainin interfaceMBeanServerConnection
-
getDomains
public String[] getDomains()
- Specified by:
getDomainsin interfaceMBeanServer- Specified by:
getDomainsin interfaceMBeanServerConnection
-
addNotificationListener
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException
- Specified by:
addNotificationListenerin interfaceMBeanServer- Specified by:
addNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
addNotificationListener
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException
- Specified by:
addNotificationListenerin interfaceMBeanServer- Specified by:
addNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException
- Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException
- Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException
- Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException
- Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundException
-
getMBeanInfo
public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException
- Specified by:
getMBeanInfoin interfaceMBeanServer- Specified by:
getMBeanInfoin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionIntrospectionExceptionReflectionException
-
isInstanceOf
public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException
- Specified by:
isInstanceOfin interfaceMBeanServer- Specified by:
isInstanceOfin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
instantiate
public Object instantiate(String className) throws ReflectionException, MBeanException
- Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanException
-
instantiate
public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException
- Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanExceptionInstanceNotFoundException
-
instantiate
public Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException
- Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanException
-
instantiate
public Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, MBeanException, InstanceNotFoundException
- Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanExceptionInstanceNotFoundException
-
deserialize
public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException, OperationsException
- Specified by:
deserializein interfaceMBeanServer- Throws:
InstanceNotFoundExceptionOperationsException
-
deserialize
public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, ReflectionException
- Specified by:
deserializein interfaceMBeanServer- Throws:
OperationsExceptionReflectionException
-
deserialize
public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws InstanceNotFoundException, OperationsException, ReflectionException
- Specified by:
deserializein interfaceMBeanServer- Throws:
InstanceNotFoundExceptionOperationsExceptionReflectionException
-
getClassLoaderFor
public ClassLoader getClassLoaderFor(ObjectName mbeanName) throws InstanceNotFoundException
- Specified by:
getClassLoaderForin interfaceMBeanServer- Throws:
InstanceNotFoundException
-
getClassLoader
public ClassLoader getClassLoader(ObjectName loaderName) throws InstanceNotFoundException
- Specified by:
getClassLoaderin interfaceMBeanServer- Throws:
InstanceNotFoundException
-
getClassLoaderRepository
public ClassLoaderRepository getClassLoaderRepository()
- Specified by:
getClassLoaderRepositoryin interfaceMBeanServer
-
-