home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / net / NetPermission.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  2.6 KB  |  84 lines

  1. /*
  2.  * @(#)NetPermission.java    1.29 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.net;
  16.  
  17. import java.security.*;
  18. import java.util.Enumeration;
  19. import java.util.Hashtable;
  20. import java.util.StringTokenizer;
  21.  
  22. /**
  23.  * This class is for various network permissions. 
  24.  * A NetPermission contains a name but
  25.  * no actions list; you either have the named permission 
  26.  * or you don't.
  27.  * <P>
  28.  * The name is the name of the network permission ("Authenticator.setDefault",
  29.  * "Authenticator.requestPasswordAuthentication", etc). The naming
  30.  * convention follows the  hierarchical property naming convention.
  31.  * Also, an asterisk 
  32.  * may appear at the end of the name, following a ".", or by itself, to 
  33.  * signify a wildcard match. For example: "Authenticator.*" or "*" is valid, 
  34.  * "*foo" or "a*b" is not valid.
  35.  * <P>
  36.  * @see java.security.BasicPermission
  37.  * @see java.security.Permission
  38.  * @see java.security.Permissions
  39.  * @see java.security.PermissionCollection
  40.  * @see java.lang.SecurityManager
  41.  *
  42.  * @version 1.29 98/03/18
  43.  *
  44.  * @author Marianne Mueller
  45.  * @author Roland Schemers
  46.  */
  47.  
  48. public final class NetPermission extends BasicPermission {
  49.  
  50.     /** use serialVersionUID from JDK 1.2 for interoperability */
  51.     private static final long serialVersionUID = -8343910153355041693L;
  52.  
  53.     /**
  54.      * Creates a new NetPermission with the specified name.
  55.      * The name is the symbolic name of the NetPermission, such as
  56.      * "Authenticator.setDefault", etc. An asterisk 
  57.      * may appear at the end of the name, following a ".", or by itself, to 
  58.      * signify a wildcard match.
  59.      *
  60.      * @param name the name of the NetPermission.
  61.      */
  62.  
  63.     public NetPermission(String name)
  64.     {
  65.     super(name);
  66.     }
  67.  
  68.     /**
  69.      * Creates a new NetPermission object with the specified name.
  70.      * The name is the symbolic name of the NetPermission, and the
  71.      * actions String is currently unused and should be null. This
  72.      * constructor exists for use by the <code>Policy</code> object
  73.      * to instantiate new Permission objects.
  74.      *
  75.      * @param name the name of the NetPermission.
  76.      * @param actions should be null.
  77.      */
  78.  
  79.     public NetPermission(String name, String actions) 
  80.     {
  81.     super(name, actions);
  82.     }
  83. }
  84.