An object of this class implements the MBeanServer interface and, for each of its methods, calls an appropriate checking method and then forwards the request to a wrapped MBeanServer object. The checking method may throw a RuntimeException if the operation is not allowed; in this case the request is not forwarded to the wrapped object.
A typical use of this class is to insert it between a connector server
such as the RMI connector and the MBeanServer with which the connector
is associated. Requests from the connector client can then be filtered
and those operations that are not allowed, or not allowed in a particular
context, can be rejected by throwing a SecurityException
in the corresponding check* method.
This is an abstract class, because in its implementation none of the checking methods does anything. To be useful, it must be subclassed and at least one of the checking methods overridden to do some checking. Some or all of the MBeanServer methods may also be overridden, for instance if the default checking behavior is inappropriate.
The access controller will refuse to create an MBean that is a ClassLoader.
| Modifier and Type | Field and Description |
|---|---|
| private MBeanServer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
Implements javax. Call |
| public void | addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
Implements javax. Call |
| private void | |
| protected void | |
| protected abstract void | |
| protected void | |
| protected abstract void | |
| public ObjectInstance | createMBean(String className, ObjectName name)
Implements javax. Call |
| public ObjectInstance | createMBean(String className, ObjectName name, Object[] params, String[] signature)
Implements javax. Call |
| public ObjectInstance | createMBean(String className, ObjectName name, ObjectName loaderName)
Implements javax. Call |
| public ObjectInstance | createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature)
Implements javax. Call |
| public ObjectInputStream | deserialize(ObjectName name, byte[] data)
Overrides default javax.
Deprecated
Call |
| public ObjectInputStream | deserialize(String className, byte[] data)
Overrides default javax.
Deprecated
Call |
| public ObjectInputStream | deserialize(String className, ObjectName loaderName, byte[] data)
Overrides default javax.
Deprecated
Call |
| public Object | getAttribute(ObjectName name, String attribute)
Implements javax. Call |
| public AttributeList | getAttributes(ObjectName name, String[] attributes)
Implements javax. Call |
| public ClassLoader | getClassLoader(ObjectName loaderName)
Implements javax. Call |
| public ClassLoader | getClassLoaderFor(ObjectName mbeanName)
Implements javax. Call |
| public ClassLoaderRepository | getClassLoaderRepository()
Implements javax. Call |
| public String | getDefaultDomain()
Implements javax. Call |
| public String[] | getDomains()
Implements javax. Call |
| public Integer | getMBeanCount()
Implements javax. Call |
| public MBeanInfo | getMBeanInfo(ObjectName name)
Implements javax. Call |
| public MBeanServer | getMBeanServer()
Implements javax. Returns the MBeanServer object to which requests will be forwarded. |
| public ObjectInstance | getObjectInstance(ObjectName name)
Implements javax. Call |
| public Object | instantiate(String className)
Implements javax. Call |
| public Object | instantiate(String className, Object[] params, String[] signature)
Implements javax. Call |
| public Object | instantiate(String className, ObjectName loaderName)
Implements javax. Call |
| public Object | instantiate(String className, ObjectName loaderName, Object[] params, String[] signature)
Implements javax. Call |
| public Object | invoke(ObjectName name, String operationName, Object[] params, String[] signature)
Implements javax. Call |
| public boolean | isInstanceOf(ObjectName name, String className)
Implements javax. Call |
| public boolean | isRegistered(ObjectName name)
Implements javax. Call |
| public Set | queryMBeans(ObjectName name, QueryExp query)
Implements javax. Call |
| public Set | queryNames(ObjectName name, QueryExp query)
Implements javax. Call |
| public ObjectInstance | registerMBean(Object object, ObjectName name)
Implements javax. Call |
| public void | removeNotificationListener(ObjectName name, NotificationListener listener)
Implements javax. Call |
| public void | removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
Implements javax. Call |
| public void | removeNotificationListener(ObjectName name, ObjectName listener)
Implements javax. Call |
| public void | removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
Implements javax. Call |
| public void | setAttribute(ObjectName name, Attribute attribute)
Implements javax. Call |
| public AttributeList | setAttributes(ObjectName name, AttributeList attributes)
Implements javax. Call |
| public void | setMBeanServer(MBeanServer mbs)
Implements javax. Sets the MBeanServer object to which requests will be forwarded after treatment by this object. |
| public void | unregisterMBean(ObjectName name)
Implements javax. Call |
| mbs | back to summary |
|---|---|
| private MBeanServer mbs | |
| MBeanServerAccessController | back to summary |
|---|---|
| public MBeanServerAccessController() | |
| addNotificationListener | back to summary |
|---|---|
| public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException Implements javax. Call
| |
| addNotificationListener | back to summary |
|---|---|
| public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException Implements javax. Call
| |
| checkClassLoader | back to summary |
|---|---|
| private void checkClassLoader(Object object) | |
| checkCreate | back to summary |
|---|---|
| protected void checkCreate(String className) Check if the caller can create the named class. The default
implementation of this method calls | |
| checkRead | back to summary |
|---|---|
| protected abstract void checkRead() Check if the caller can do read operations. This method does nothing if so, otherwise throws SecurityException. | |
| checkUnregister | back to summary |
|---|---|
| protected void checkUnregister(ObjectName name) Check if the caller can unregister the named MBean. The default
implementation of this method calls | |
| checkWrite | back to summary |
|---|---|
| protected abstract void checkWrite() Check if the caller can do write operations. This method does nothing if so, otherwise throws SecurityException. | |
| createMBean | back to summary |
|---|---|
| public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException Implements javax. Call
| |
| createMBean | back to summary |
|---|---|
| public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException Implements javax. Call
| |
| createMBean | back to summary |
|---|---|
| public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException Implements javax. Call
| |
| createMBean | back to summary |
|---|---|
| public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException Implements javax. Call
| |
| deserialize | back to summary |
|---|---|
| public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException, OperationsException Overrides default javax. Deprecated
Call
| |
| deserialize | back to summary |
|---|---|
| public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, ReflectionException Overrides default javax. Deprecated
Call
| |
| deserialize | back to summary |
|---|---|
| public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws InstanceNotFoundException, OperationsException, ReflectionException Overrides default javax. Deprecated
Call
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException Implements javax. Call
| |
| getAttributes | back to summary |
|---|---|
| public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException Implements javax. Call
| |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader(ObjectName loaderName) throws InstanceNotFoundException Implements javax. Call
| |
| getClassLoaderFor | back to summary |
|---|---|
| public ClassLoader getClassLoaderFor(ObjectName mbeanName) throws InstanceNotFoundException Implements javax. Call
| |
| getClassLoaderRepository | back to summary |
|---|---|
| public ClassLoaderRepository getClassLoaderRepository() Implements javax. Call | |
| getDefaultDomain | back to summary |
|---|---|
| public String getDefaultDomain() Implements javax. Call | |
| getDomains | back to summary |
|---|---|
| public String[] getDomains() Implements javax. Call | |
| getMBeanCount | back to summary |
|---|---|
| public Integer getMBeanCount() Implements javax. Call | |
| getMBeanInfo | back to summary |
|---|---|
| public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException Implements javax. Call
| |
| getMBeanServer | back to summary |
|---|---|
| public MBeanServer getMBeanServer() Implements javax. Doc from javax. Returns the MBeanServer object to which requests will be forwarded. | |
| getObjectInstance | back to summary |
|---|---|
| public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException Implements javax. Call
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(String className) throws ReflectionException, MBeanException Implements javax. Call
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException Implements javax. Call
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException Implements javax. Call
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, MBeanException, InstanceNotFoundException Implements javax. Call
| |
| invoke | back to summary |
|---|---|
| public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException Implements javax. Call
| |
| isInstanceOf | back to summary |
|---|---|
| public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException Implements javax. Call
| |
| isRegistered | back to summary |
|---|---|
| public boolean isRegistered(ObjectName name) Implements javax. Call | |
| queryMBeans | back to summary |
|---|---|
| public Set Implements javax. Call | |
| queryNames | back to summary |
|---|---|
| public Set Implements javax. Call | |
| registerMBean | back to summary |
|---|---|
| public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException Implements javax. Call
| |
| removeNotificationListener | back to summary |
|---|---|
| public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException Implements javax. Call
| |
| removeNotificationListener | back to summary |
|---|---|
| public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException Implements javax. Call
| |
| removeNotificationListener | back to summary |
|---|---|
| public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException Implements javax. Call
| |
| removeNotificationListener | back to summary |
|---|---|
| public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException Implements javax. Call
| |
| setAttributes | back to summary |
|---|---|
| public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException Implements javax. Call
| |
| setMBeanServer | back to summary |
|---|---|
| public void setMBeanServer(MBeanServer mbs) Implements javax. Doc from javax. Sets the MBeanServer object to which requests will be forwarded after treatment by this object. | |
| unregisterMBean | back to summary |
|---|---|
| public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException Implements javax. Call
| |