|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdmk.MBeanServerForwarder
com.sun.jdmk.MBeanServerChecker
public abstract class MBeanServerChecker
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 HTTP 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.
A checking method can obtain the OperationContext
associated with the request being handled, if there is one, by
calling getOperationContext().
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.
In effect, three levels of checking are possible:
checkAny so that it applies
some restriction to every operation, or so that it consults the
methodName parameter to apply restrictions to particular
operations.check* methods to
apply restrictions to certain classes of methods. Again, the
methodName parameter is available to refine these
restrictions by applying them only to particular operations.MBeanServer
interface itself. These methods are called with exactly the same
parameters as they will have in the real MBeanServer, so decisions can
be based on complete information. If an operation is accepted, the
overriding method should call super.methodName to
forward it to the real MBeanServer.The documentation of the individual check* methods describes
what the value of the methodName parameter may be. Future
versions of this class may extend these possible values to allow for new
methods in the MBeanServer interface.
| Constructor Summary | |
|---|---|
protected |
MBeanServerChecker(javax.management.MBeanServer mbs)
Make a new MBeanServerChecker that forwards each method from the MBeanServer interface to the given object, after calling an appropriate checking method. |
| Method Summary | |
|---|---|
void |
addNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Call checkAny("addNotificationListener", name), then
checkNotification("addNotificationListener", name),
then forward this method to the wrapped object. |
void |
addNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Call checkAny("addNotificationListener", name), then
checkNotification("addNotificationListener", name),
then forward this method to the wrapped object. |
protected void |
checkAny(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by every method from the MBeanServer interface. |
protected void |
checkCreate(java.lang.String methodName,
java.lang.String className,
javax.management.ObjectName objectName,
javax.management.ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Checking operation invoked by each of the overloaded forms of createMBean and by registerMBean. |
protected void |
checkDelete(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by unregisterMBean. |
protected void |
checkDeserialize(java.lang.String methodName,
java.lang.Object objectNameOrClass)
Checking operation invoked by each of the overloaded forms of deserialize. |
protected void |
checkInstantiate(java.lang.String methodName,
java.lang.String className,
javax.management.ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Checking operation invoked by each of the overloaded forms of instantiate. |
protected void |
checkInvoke(java.lang.String methodName,
javax.management.ObjectName objectName,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
Checking operation invoked by invoke. |
protected void |
checkNotification(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by each of the overloaded forms of addNotificationListener and
removeNotificationListener. |
protected void |
checkQuery(java.lang.String methodName,
javax.management.ObjectName name,
javax.management.QueryExp query)
Checking operation invoked by queryMBeans and
queryNames. |
protected void |
checkRead(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by getAttribute,
getAttributes, getObjectInstance,
isRegistered, getMBeanCount,
getDefaultDomain, getMBeanInfo, and
isInstanceOf. |
protected void |
checkWrite(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by setAttribute and
setAttributes. |
javax.management.ObjectInstance |
createMBean(java.lang.String className,
javax.management.ObjectName name,
java.lang.Object[] params,
java.lang.String[] signature)
Call checkAny("createMBean", name), then
checkCreate("createMBean", className, name, null, params,
signature), then forward this method to the wrapped object. |
javax.management.ObjectInstance |
createMBean(java.lang.String className,
javax.management.ObjectName name,
javax.management.ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Call checkAny("createMBean", name), then
checkCreate("createMBean", className, name, loaderName, params,
signature), then forward this method to the wrapped object. |
java.io.ObjectInputStream |
deserialize(javax.management.ObjectName name,
byte[] data)
Call checkAny("deserialize", name), then
checkDeserialize("deserialize", name),
then forward this method to the wrapped object. |
java.io.ObjectInputStream |
deserialize(java.lang.String className,
byte[] data)
Call checkAny("deserialize", null), then
checkDeserialize("deserialize", className),
then forward this method to the wrapped object. |
java.io.ObjectInputStream |
deserialize(java.lang.String className,
javax.management.ObjectName loaderName,
byte[] data)
Call checkAny("deserialize", null), then
checkDeserialize("deserialize", className),
then forward this method to the wrapped object. |
java.lang.Object |
getAttribute(javax.management.ObjectName name,
java.lang.String attribute)
Call checkAny("getAttribute"), then
checkRead("getAttribute", name),
then forward this method to the wrapped object. |
javax.management.AttributeList |
getAttributes(javax.management.ObjectName name,
java.lang.String[] attributes)
Call checkAny("getAttributes", name), then
checkRead("getAttributes", name),
then forward this method to the wrapped object. |
java.lang.ClassLoader |
getClassLoader(javax.management.ObjectName loaderName)
Call checkAny("getClassLoader", loaderName), then
checkRead("getClassLoader", loaderName),
then forward this method to the wrapped object. |
java.lang.ClassLoader |
getClassLoaderFor(javax.management.ObjectName mbeanName)
Call checkAny("getClassLoaderFor", mbeanName), then
checkRead("getClassLoaderFor", mbeanName),
then forward this method to the wrapped object. |
javax.management.loading.ClassLoaderRepository |
getClassLoaderRepository()
Call checkAny("getClassLoaderRepository", null), then
checkRead("getClassLoaderRepository", null),
then forward this method to the wrapped object. |
java.lang.String |
getDefaultDomain()
Call checkAny("getDefaultDomain", null), then
checkRead("getDefaultDomain", null),
then forward this method to the wrapped object. |
java.lang.String[] |
getDomains()
Call checkAny("getDomains", null), then
checkRead("getDomains", null),
then forward this method to the wrapped object. |
java.lang.Integer |
getMBeanCount()
Call checkAny("getMBeanCount", null), then
checkRead("getMBeanCount", null),
then forward this method to the wrapped object. |
javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName name)
Call checkAny("getMBeanInfo", name), then
checkRead("getMBeanInfo", name),
then forward this method to the wrapped object. |
javax.management.ObjectInstance |
getObjectInstance(javax.management.ObjectName name)
Call checkAny("getObjectInstance", name), then
checkRead("getObjectInstance", name),
then forward this method to the wrapped object. |
protected OperationContext |
getOperationContext()
Return the OperationContext associated with the
request being handled. |
java.lang.Object |
instantiate(java.lang.String className,
java.lang.Object[] params,
java.lang.String[] signature)
Call checkAny("instantiate", null), then
checkInstantiate("instantiate", className, null, params,
signature), then forward this method to the wrapped
object. |
java.lang.Object |
instantiate(java.lang.String className,
javax.management.ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Call checkAny("instantiate", null), then
checkInstantiate("instantiate", className, loaderName,
params, signature), then forward this method to the
wrapped object. |
java.lang.Object |
invoke(javax.management.ObjectName name,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
Call checkAny("invoke", name), then
checkInvoke("invoke", name, operationName, params,
signature), then forward this method to the wrapped object. |
boolean |
isInstanceOf(javax.management.ObjectName name,
java.lang.String className)
Call checkAny("isInstanceOf", name), then
checkRead("isInstanceOf", name),
then forward this method to the wrapped object. |
boolean |
isRegistered(javax.management.ObjectName name)
Call checkAny("isRegistered", name), then
checkRead("isRegistered", name),
then forward this method to the wrapped object. |
java.util.Set |
queryMBeans(javax.management.ObjectName name,
javax.management.QueryExp query)
Call checkAny("queryMBeans", name), then
checkQuery("queryMBeans", name, query),
then forward this method to the wrapped object. |
java.util.Set |
queryNames(javax.management.ObjectName name,
javax.management.QueryExp query)
Call checkAny("queryNames", name), then
checkQuery("queryNames", name, query),
then forward this method to the wrapped object. |
javax.management.ObjectInstance |
registerMBean(java.lang.Object object,
javax.management.ObjectName name)
Call checkAny("registerMBean", name), then
checkCreate("registerMBean", object.getClass().getName(), name,
null, null, null), then forward this method to the wrapped
object. |
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener)
Call checkAny("removeNotificationListener", name), then
checkNotification("removeNotificationListener", name),
then forward this method to the wrapped object. |
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Call checkAny("removeNotificationListener", name), then
checkNotification("removeNotificationListener", name),
then forward this method to the wrapped object. |
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener)
Call checkAny("removeNotificationListener", name), then
checkNotification("removeNotificationListener", name),
then forward this method to the wrapped object. |
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Call checkAny("removeNotificationListener", name), then
checkNotification("removeNotificationListener", name),
then forward this method to the wrapped object. |
void |
setAttribute(javax.management.ObjectName name,
javax.management.Attribute attribute)
Call checkAny("setAttribute", name), then
checkWrite("setAttribute", name),
then forward this method to the wrapped object. |
javax.management.AttributeList |
setAttributes(javax.management.ObjectName name,
javax.management.AttributeList attributes)
Call checkAny("setAttributes", name), then
checkWrite("setAttributes", name),
then forward this method to the wrapped object. |
void |
unregisterMBean(javax.management.ObjectName name)
Call checkAny("unregisterMBean", name), then
checkDelete("unregisterMBean", name),
then forward this method to the wrapped object. |
| Methods inherited from class com.sun.jdmk.MBeanServerForwarder |
|---|
createMBean, createMBean, getMBeanServer, instantiate, instantiate, setMBeanServer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected MBeanServerChecker(javax.management.MBeanServer mbs)
Make a new MBeanServerChecker that forwards each method from the MBeanServer interface to the given object, after calling an appropriate checking method.
mbs - the object implementing the MBeanServer interface to which
methods should be forwarded.| Method Detail |
|---|
public java.lang.Object instantiate(java.lang.String className,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.ReflectionException,
javax.management.MBeanException
checkAny("instantiate", null), then
checkInstantiate("instantiate", className, null, params,
signature), then forward this method to the wrapped
object.
instantiate in interface javax.management.MBeanServerinstantiate in class MBeanServerForwarderjavax.management.ReflectionException
javax.management.MBeanException
public java.lang.Object instantiate(java.lang.String className,
javax.management.ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.ReflectionException,
javax.management.MBeanException,
javax.management.InstanceNotFoundException
checkAny("instantiate", null), then
checkInstantiate("instantiate", className, loaderName,
params, signature), then forward this method to the
wrapped object.
instantiate in interface javax.management.MBeanServerinstantiate in class MBeanServerForwarderjavax.management.ReflectionException
javax.management.MBeanException
javax.management.InstanceNotFoundException
public javax.management.ObjectInstance createMBean(java.lang.String className,
javax.management.ObjectName name,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.ReflectionException,
javax.management.InstanceAlreadyExistsException,
javax.management.MBeanRegistrationException,
javax.management.MBeanException,
javax.management.NotCompliantMBeanException
checkAny("createMBean", name), then
checkCreate("createMBean", className, name, null, params,
signature), then forward this method to the wrapped object.
createMBean in interface javax.management.MBeanServercreateMBean in interface javax.management.MBeanServerConnectioncreateMBean in class MBeanServerForwarderjavax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
public javax.management.ObjectInstance createMBean(java.lang.String className,
javax.management.ObjectName name,
javax.management.ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.ReflectionException,
javax.management.InstanceAlreadyExistsException,
javax.management.MBeanRegistrationException,
javax.management.MBeanException,
javax.management.NotCompliantMBeanException,
javax.management.InstanceNotFoundException
checkAny("createMBean", name), then
checkCreate("createMBean", className, name, loaderName, params,
signature), then forward this method to the wrapped object.
createMBean in interface javax.management.MBeanServercreateMBean in interface javax.management.MBeanServerConnectioncreateMBean in class MBeanServerForwarderjavax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
javax.management.InstanceNotFoundException
public javax.management.ObjectInstance registerMBean(java.lang.Object object,
javax.management.ObjectName name)
throws javax.management.InstanceAlreadyExistsException,
javax.management.MBeanRegistrationException,
javax.management.NotCompliantMBeanException
checkAny("registerMBean", name), then
checkCreate("registerMBean", object.getClass().getName(), name,
null, null, null), then forward this method to the wrapped
object.
registerMBean in interface javax.management.MBeanServerregisterMBean in class MBeanServerForwarderjavax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.NotCompliantMBeanException
public void unregisterMBean(javax.management.ObjectName name)
throws javax.management.InstanceNotFoundException,
javax.management.MBeanRegistrationException
checkAny("unregisterMBean", name), then
checkDelete("unregisterMBean", name),
then forward this method to the wrapped object.
unregisterMBean in interface javax.management.MBeanServerunregisterMBean in interface javax.management.MBeanServerConnectionunregisterMBean in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.MBeanRegistrationException
public javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name)
throws javax.management.InstanceNotFoundException
checkAny("getObjectInstance", name), then
checkRead("getObjectInstance", name),
then forward this method to the wrapped object.
getObjectInstance in interface javax.management.MBeanServergetObjectInstance in interface javax.management.MBeanServerConnectiongetObjectInstance in class MBeanServerForwarderjavax.management.InstanceNotFoundException
public java.util.Set queryMBeans(javax.management.ObjectName name,
javax.management.QueryExp query)
checkAny("queryMBeans", name), then
checkQuery("queryMBeans", name, query),
then forward this method to the wrapped object.
queryMBeans in interface javax.management.MBeanServerqueryMBeans in interface javax.management.MBeanServerConnectionqueryMBeans in class MBeanServerForwarder
public java.util.Set queryNames(javax.management.ObjectName name,
javax.management.QueryExp query)
checkAny("queryNames", name), then
checkQuery("queryNames", name, query),
then forward this method to the wrapped object.
queryNames in interface javax.management.MBeanServerqueryNames in interface javax.management.MBeanServerConnectionqueryNames in class MBeanServerForwarderpublic boolean isRegistered(javax.management.ObjectName name)
checkAny("isRegistered", name), then
checkRead("isRegistered", name),
then forward this method to the wrapped object.
isRegistered in interface javax.management.MBeanServerisRegistered in interface javax.management.MBeanServerConnectionisRegistered in class MBeanServerForwarderpublic java.lang.Integer getMBeanCount()
checkAny("getMBeanCount", null), then
checkRead("getMBeanCount", null),
then forward this method to the wrapped object.
getMBeanCount in interface javax.management.MBeanServergetMBeanCount in interface javax.management.MBeanServerConnectiongetMBeanCount in class MBeanServerForwarder
public java.lang.Object getAttribute(javax.management.ObjectName name,
java.lang.String attribute)
throws javax.management.MBeanException,
javax.management.AttributeNotFoundException,
javax.management.InstanceNotFoundException,
javax.management.ReflectionException
checkAny("getAttribute"), then
checkRead("getAttribute", name),
then forward this method to the wrapped object.
getAttribute in interface javax.management.MBeanServergetAttribute in interface javax.management.MBeanServerConnectiongetAttribute in class MBeanServerForwarderjavax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
public javax.management.AttributeList getAttributes(javax.management.ObjectName name,
java.lang.String[] attributes)
throws javax.management.InstanceNotFoundException,
javax.management.ReflectionException
checkAny("getAttributes", name), then
checkRead("getAttributes", name),
then forward this method to the wrapped object.
getAttributes in interface javax.management.MBeanServergetAttributes in interface javax.management.MBeanServerConnectiongetAttributes in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.ReflectionException
public void setAttribute(javax.management.ObjectName name,
javax.management.Attribute attribute)
throws javax.management.InstanceNotFoundException,
javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException,
javax.management.ReflectionException
checkAny("setAttribute", name), then
checkWrite("setAttribute", name),
then forward this method to the wrapped object.
setAttribute in interface javax.management.MBeanServersetAttribute in interface javax.management.MBeanServerConnectionsetAttribute in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
public javax.management.AttributeList setAttributes(javax.management.ObjectName name,
javax.management.AttributeList attributes)
throws javax.management.InstanceNotFoundException,
javax.management.ReflectionException
checkAny("setAttributes", name), then
checkWrite("setAttributes", name),
then forward this method to the wrapped object.
setAttributes in interface javax.management.MBeanServersetAttributes in interface javax.management.MBeanServerConnectionsetAttributes in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.ReflectionException
public java.lang.Object invoke(javax.management.ObjectName name,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.InstanceNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
checkAny("invoke", name), then
checkInvoke("invoke", name, operationName, params,
signature), then forward this method to the wrapped object.
invoke in interface javax.management.MBeanServerinvoke in interface javax.management.MBeanServerConnectioninvoke in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionExceptionpublic java.lang.String getDefaultDomain()
checkAny("getDefaultDomain", null), then
checkRead("getDefaultDomain", null),
then forward this method to the wrapped object.
getDefaultDomain in interface javax.management.MBeanServergetDefaultDomain in interface javax.management.MBeanServerConnectiongetDefaultDomain in class MBeanServerForwarderpublic java.lang.String[] getDomains()
checkAny("getDomains", null), then
checkRead("getDomains", null),
then forward this method to the wrapped object.
getDomains in interface javax.management.MBeanServergetDomains in interface javax.management.MBeanServerConnectiongetDomains in class MBeanServerForwarder
public void addNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.InstanceNotFoundException
checkAny("addNotificationListener", name), then
checkNotification("addNotificationListener", name),
then forward this method to the wrapped object.
addNotificationListener in interface javax.management.MBeanServeraddNotificationListener in interface javax.management.MBeanServerConnectionaddNotificationListener in class MBeanServerForwarderjavax.management.InstanceNotFoundException
public void addNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.InstanceNotFoundException
checkAny("addNotificationListener", name), then
checkNotification("addNotificationListener", name),
then forward this method to the wrapped object.
addNotificationListener in interface javax.management.MBeanServeraddNotificationListener in interface javax.management.MBeanServerConnectionaddNotificationListener in class MBeanServerForwarderjavax.management.InstanceNotFoundException
public void removeNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener)
throws javax.management.InstanceNotFoundException,
javax.management.ListenerNotFoundException
checkAny("removeNotificationListener", name), then
checkNotification("removeNotificationListener", name),
then forward this method to the wrapped object.
removeNotificationListener in interface javax.management.MBeanServerremoveNotificationListener in interface javax.management.MBeanServerConnectionremoveNotificationListener in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
public void removeNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.InstanceNotFoundException,
javax.management.ListenerNotFoundException
checkAny("removeNotificationListener", name), then
checkNotification("removeNotificationListener", name),
then forward this method to the wrapped object.
removeNotificationListener in interface javax.management.MBeanServerremoveNotificationListener in interface javax.management.MBeanServerConnectionremoveNotificationListener in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
public void removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener)
throws javax.management.InstanceNotFoundException,
javax.management.ListenerNotFoundException
checkAny("removeNotificationListener", name), then
checkNotification("removeNotificationListener", name),
then forward this method to the wrapped object.
removeNotificationListener in interface javax.management.MBeanServerremoveNotificationListener in interface javax.management.MBeanServerConnectionremoveNotificationListener in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
public void removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.InstanceNotFoundException,
javax.management.ListenerNotFoundException
checkAny("removeNotificationListener", name), then
checkNotification("removeNotificationListener", name),
then forward this method to the wrapped object.
removeNotificationListener in interface javax.management.MBeanServerremoveNotificationListener in interface javax.management.MBeanServerConnectionremoveNotificationListener in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
throws javax.management.InstanceNotFoundException,
javax.management.IntrospectionException,
javax.management.ReflectionException
checkAny("getMBeanInfo", name), then
checkRead("getMBeanInfo", name),
then forward this method to the wrapped object.
getMBeanInfo in interface javax.management.MBeanServergetMBeanInfo in interface javax.management.MBeanServerConnectiongetMBeanInfo in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.IntrospectionException
javax.management.ReflectionException
public boolean isInstanceOf(javax.management.ObjectName name,
java.lang.String className)
throws javax.management.InstanceNotFoundException
checkAny("isInstanceOf", name), then
checkRead("isInstanceOf", name),
then forward this method to the wrapped object.
isInstanceOf in interface javax.management.MBeanServerisInstanceOf in interface javax.management.MBeanServerConnectionisInstanceOf in class MBeanServerForwarderjavax.management.InstanceNotFoundException
public java.io.ObjectInputStream deserialize(javax.management.ObjectName name,
byte[] data)
throws javax.management.InstanceNotFoundException,
javax.management.OperationsException
checkAny("deserialize", name), then
checkDeserialize("deserialize", name),
then forward this method to the wrapped object.
deserialize in interface javax.management.MBeanServerdeserialize in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.OperationsException
public java.io.ObjectInputStream deserialize(java.lang.String className,
byte[] data)
throws javax.management.OperationsException,
javax.management.ReflectionException
checkAny("deserialize", null), then
checkDeserialize("deserialize", className),
then forward this method to the wrapped object.
deserialize in interface javax.management.MBeanServerdeserialize in class MBeanServerForwarderjavax.management.OperationsException
javax.management.ReflectionException
public java.io.ObjectInputStream deserialize(java.lang.String className,
javax.management.ObjectName loaderName,
byte[] data)
throws javax.management.InstanceNotFoundException,
javax.management.OperationsException,
javax.management.ReflectionException
checkAny("deserialize", null), then
checkDeserialize("deserialize", className),
then forward this method to the wrapped object.
deserialize in interface javax.management.MBeanServerdeserialize in class MBeanServerForwarderjavax.management.InstanceNotFoundException
javax.management.OperationsException
javax.management.ReflectionException
public java.lang.ClassLoader getClassLoaderFor(javax.management.ObjectName mbeanName)
throws javax.management.InstanceNotFoundException
checkAny("getClassLoaderFor", mbeanName), then
checkRead("getClassLoaderFor", mbeanName),
then forward this method to the wrapped object.
getClassLoaderFor in interface javax.management.MBeanServergetClassLoaderFor in class MBeanServerForwarderjavax.management.InstanceNotFoundException
public java.lang.ClassLoader getClassLoader(javax.management.ObjectName loaderName)
throws javax.management.InstanceNotFoundException
checkAny("getClassLoader", loaderName), then
checkRead("getClassLoader", loaderName),
then forward this method to the wrapped object.
getClassLoader in interface javax.management.MBeanServergetClassLoader in class MBeanServerForwarderjavax.management.InstanceNotFoundExceptionpublic javax.management.loading.ClassLoaderRepository getClassLoaderRepository()
checkAny("getClassLoaderRepository", null), then
checkRead("getClassLoaderRepository", null),
then forward this method to the wrapped object.
getClassLoaderRepository in interface javax.management.MBeanServergetClassLoaderRepository in class MBeanServerForwarder
protected OperationContext getOperationContext()
throws java.lang.ClassCastException
Return the OperationContext associated with the
request being handled.
OperationContext associated with the
request being handled, or null if there is none.
java.lang.ClassCastException
protected void checkAny(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by every method from the
MBeanServer interface.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name, e.g.,
"createMBean".objectName - the ObjectName of the MBean
referenced by the operation, or null if there is none.
protected void checkCreate(java.lang.String methodName,
java.lang.String className,
javax.management.ObjectName objectName,
javax.management.ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Checking operation invoked by each of the overloaded forms of
createMBean and by registerMBean.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name,
"createMBean" or "registerMBean".className - the className parameter of the
createMBean operation.objectName - the name parameter of the
createMBean operation.loaderName - the loaderName parameter of the
createMBean operation, or null for those forms of
the operation that do not have one.params - the params parameter of the
createMBean operation, or null for those forms of
the operation that do not have one.signature - the signature parameter of the
createMBean operation, or null for those forms of
the operation that do not have one.
protected void checkInstantiate(java.lang.String methodName,
java.lang.String className,
javax.management.ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Checking operation invoked by each of the overloaded forms of
instantiate.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name,
"instantiate".className - the className parameter of the
instantiate operation.loaderName - the loaderName parameter of the
instantiate operation, or null for those forms of
the operation that do not have one.params - the params parameter of the
instantiate operation, or null for those forms of
the operation that do not have one.signature - the signature parameter of the
instantiate operation, or null for those forms of
the operation that do not have one.
protected void checkDelete(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by unregisterMBean.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name,
"unregisterMBean".objectName - the name parameter of the
unregisterMBean operation.
protected void checkRead(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by getAttribute,
getAttributes, getObjectInstance,
isRegistered, getMBeanCount,
getDefaultDomain, getMBeanInfo, and
isInstanceOf.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name, e.g.,
"getAttribute".objectName - the ObjectName of the object being accessed, for those
operations where there is one, or null otherwise.
protected void checkWrite(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by setAttribute and
setAttributes.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name, e.g.,
"setAttribute".objectName - the ObjectName of the object being accessed.
protected void checkQuery(java.lang.String methodName,
javax.management.ObjectName name,
javax.management.QueryExp query)
Checking operation invoked by queryMBeans and
queryNames.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name, e.g.,
"queryMBeans".name - the name parameter of the operation.query - the query parameter of the operation.
protected void checkInvoke(java.lang.String methodName,
javax.management.ObjectName objectName,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
Checking operation invoked by invoke.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name,
"invoke".objectName - the name parameter of the
invoke operation.operationName - the operationName parameter of the
invoke operation.params - the params parameter of the
invoke operation.signature - the signature parameter of the
invoke operation.
protected void checkNotification(java.lang.String methodName,
javax.management.ObjectName objectName)
Checking operation invoked by each of the overloaded forms of
addNotificationListener and
removeNotificationListener.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name, e.g.,
"addNotificationListener".objectName - the name parameter of the operation.
protected void checkDeserialize(java.lang.String methodName,
java.lang.Object objectNameOrClass)
Checking operation invoked by each of the overloaded forms of
deserialize.
The default implementation does nothing. A subclass may
override this method to throw a RuntimeException
(or a subclass of it) if the operation is not to be
allowed.
methodName - the calling method in the MBeanServer
interface. This string is just the method name,
"deserialize".objectNameOrClass - a String for those forms of the
deserialize operation that have a className
parameter, or an ObjectName for those forms that do not.
|
Open Source build 01-ea opendmk-1.0-b01-ea 2010.10.20_19:39:55_UTC |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||