java.lang.management
Class ManagementPermission

java.lang.Object
  extended by java.security.Permission
      extended by java.security.BasicPermission
          extended by java.lang.management.ManagementPermission
All Implemented Interfaces:
Serializable, Guard

public final class ManagementPermission
extends BasicPermission

Represents the permission to view or modify the data which forms part of the system management interfaces. Calls to methods of the system management beans, provided by the ManagementFactory, may perform checks against the current SecurityManager (if any) before allowing the operation to proceed. Instances of this object are supplied to the SecurityManager in order to perform these checks. It is not normal for instances of this class to be created outside the use of the SecurityManager.

This object can represent two types of management permission:

Since:
1.5
See Also:
Serialized Form

Constructor Summary
ManagementPermission(String name)
          Constructs a new ManagementPermission for one of the two permission targets, "monitor" and "control".
ManagementPermission(String name, String actions)
          Constructs a new ManagementPermission for one of the two permission targets, "monitor" and "control".
 
Method Summary
 
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
 
Methods inherited from class java.security.Permission
checkGuard, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagementPermission

public ManagementPermission(String name)
Constructs a new ManagementPermission for one of the two permission targets, "monitor" and "control".

Parameters:
name - the name of the permission this instance should represent; either "monitor" or "control".
Throws:
IllegalArgumentException - if the name is not either "monitor" or "control".

ManagementPermission

public ManagementPermission(String name,
                            String actions)
Constructs a new ManagementPermission for one of the two permission targets, "monitor" and "control". Actions are not supported, so this value should be either null or the empty string.

Parameters:
name - the name of the permission this instance should represent; either "monitor" or "control".
actions - either null or the empty string.
Throws:
IllegalArgumentException - if the name is not either "monitor" or "control", or a value for actions is specified.