src/share/classes/com/sun/tools/attach/AttachPermission.java

Print this page




  62  *   <td>createAttachProvider</td>
  63  *   <td>Ability to create an <code>AttachProvider</code> instance.
  64  *   </td>
  65  *   <td>This allows an attacker to create an AttachProvider which can
  66  *       potentially be used to attach to other Java virtual machines.
  67  *   </td>
  68  * </tr>
  69 
  70  *
  71  * </table>
  72 
  73  * <p>
  74  * Programmers do not normally create AttachPermission objects directly.
  75  * Instead they are created by the security policy code based on reading
  76  * the security policy file.
  77  *
  78  * @see com.sun.tools.attach.VirtualMachine
  79  * @see com.sun.tools.attach.spi.AttachProvider
  80  */
  81 

  82 public final class AttachPermission extends java.security.BasicPermission {
  83 
  84     /** use serialVersionUID for interoperability */
  85     static final long serialVersionUID = -4619447669752976181L;
  86 
  87     /**
  88      * Constructs a new AttachPermission object.
  89      *
  90      * @param name Permission name. Must be either "attachVirtualMachine",
  91      *             or "createAttachProvider".
  92      *
  93      * @throws NullPointerException if name is <code>null</code>.
  94      * @throws IllegalArgumentException if the name is invalid.
  95      */
  96     public AttachPermission(String name) {
  97         super(name);
  98         if (!name.equals("attachVirtualMachine") && !name.equals("createAttachProvider")) {
  99             throw new IllegalArgumentException("name: " + name);
 100         }
 101     }




  62  *   <td>createAttachProvider</td>
  63  *   <td>Ability to create an <code>AttachProvider</code> instance.
  64  *   </td>
  65  *   <td>This allows an attacker to create an AttachProvider which can
  66  *       potentially be used to attach to other Java virtual machines.
  67  *   </td>
  68  * </tr>
  69 
  70  *
  71  * </table>
  72 
  73  * <p>
  74  * Programmers do not normally create AttachPermission objects directly.
  75  * Instead they are created by the security policy code based on reading
  76  * the security policy file.
  77  *
  78  * @see com.sun.tools.attach.VirtualMachine
  79  * @see com.sun.tools.attach.spi.AttachProvider
  80  */
  81 
  82 @jdk.Supported
  83 public final class AttachPermission extends java.security.BasicPermission {
  84 
  85     /** use serialVersionUID for interoperability */
  86     static final long serialVersionUID = -4619447669752976181L;
  87 
  88     /**
  89      * Constructs a new AttachPermission object.
  90      *
  91      * @param name Permission name. Must be either "attachVirtualMachine",
  92      *             or "createAttachProvider".
  93      *
  94      * @throws NullPointerException if name is <code>null</code>.
  95      * @throws IllegalArgumentException if the name is invalid.
  96      */
  97     public AttachPermission(String name) {
  98         super(name);
  99         if (!name.equals("attachVirtualMachine") && !name.equals("createAttachProvider")) {
 100             throw new IllegalArgumentException("name: " + name);
 101         }
 102     }