mx4j.server
Class MBeanPermission
java.lang.Object
|
+--java.security.Permission
|
+--mx4j.server.MBeanPermission
- All Implemented Interfaces:
- java.security.Guard, java.io.Serializable
- public final class MBeanPermission
- extends java.security.Permission
Permission that control access to MBean instances registered in the MBeanServer.
The MBeanPermission contains a target name and a comma separated list of target actions.
The target name is composed by:
- the class name of the MBean, as returned by
MBeanInfo.getClassName()
- the pound character '#'
- the attribute name or the operation name
- the object name of the MBean inclosed in squared brackets
The wildcard '*' may be used to specify packages, classes or methods as a whole.
The action's list is the following:
- addListener
- removeListener
- getMBeanInfo
- getAttribute
- setAttribute
- invokeOperation
- newMBean
- registerMBean
- unregisterMBean
The wildcard '*' indicates all actions.
An example of policy file is the following:
grant codebase my-jmx-application.jar
{
permission mx4j.server.MBeanPermission "mx4j.tools.naming.NamingService", "newMBean, registerMBean, unregisterMBean";
permission mx4j.server.MBeanPermission "mx4j.tools.naming.NamingService#start", "invokeOperation";
permission mx4j.server.MBeanPermission "mx4j.tools.naming.NamingService#stop", "invokeOperation";
}
- Version:
- $Revision: 1.4 $
- Author:
- Simone Bordet
- See Also:
- Serialized Form
Methods inherited from class java.security.Permission |
checkGuard, getName, newPermissionCollection, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
MBeanPermission
public MBeanPermission(java.lang.String name)
MBeanPermission
public MBeanPermission(java.lang.String name,
java.lang.String actions)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.security.Permission
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.security.Permission
getActions
public java.lang.String getActions()
- Overrides:
getActions
in class java.security.Permission
getTargetName
public java.lang.String getTargetName()
getObjectName
public ObjectName getObjectName()
implies
public boolean implies(java.security.Permission p)
- Overrides:
implies
in class java.security.Permission