Class MBeanAccessChecker
java.lang.Object
org.jolokia.server.core.restrictor.policy.AbstractChecker<MBeanAccessChecker.Arg>
org.jolokia.server.core.restrictor.policy.MBeanAccessChecker
Checker, which checks for specific MBean attributes or operations which can be either
defined in an
<allow> or <deny> seciton.
MBean names can be specified either a full names or as patterns in which case the rule
applies to all MBeans matching this pattern. For attribute and operations names, the wildcard
* is allowed, too.
Example:
<allow>
<mbean>
<name>java.lang:type=Memory</name>
<operation>gc</operation>
</mbean>
</allow>
<deny>
<mbean>
<name>com.mchange.v2.c3p0:type=PooledDataSource,*</name>
<attribute>properties</attribute>
</mbean>
</deny>
- Since:
- 03.09.11
- Author:
- roland
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass encapsulation the arguments for the check command -
Constructor Summary
ConstructorsConstructorDescriptionMBeanAccessChecker(Document pDoc) Constructor which extracts the information relevant for this checker from the given document. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(MBeanAccessChecker.Arg pArg) Check whether for the given argument access is allowedMethods inherited from class org.jolokia.server.core.restrictor.policy.AbstractChecker
assertNodeName
-
Constructor Details
-
MBeanAccessChecker
Constructor which extracts the information relevant for this checker from the given document.- Parameters:
pDoc- document to examine- Throws:
MalformedObjectNameException- if the configuration contains malformed object names.
-
-
Method Details
-
check
Check whether for the given argument access is allowed- Specified by:
checkin classAbstractChecker<MBeanAccessChecker.Arg>- Parameters:
pArg- argument (specific to each subclass)- Returns:
- true if access is allowed, false otherwise
-