NetPermission.java revision fdb2704414a9ed92394ada0d1395e4db86889465
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18package java.net; 19 20/** 21 * This class represents permission to access network resources. 22 * <p> 23 * There are three valid target names: 24 * <dl> 25 * <dt>setDefaultAuthenticator</dt> 26 * <dd>Allows the default authenticator to be set.</dd> 27 * <dt>requestPasswordAuthentication</dt> 28 * <dd>Allows the default authenticator to be retrieved.</dd> 29 * <dt>specifyStreamHandler</dt> 30 * <dd>Allows a stream (protocol) handler to be set when constructing an URL 31 * object</dd> 32 * </dl> 33 * 34 * @see java.security.BasicPermission 35 * @see SecurityManager 36 */ 37public final class NetPermission extends java.security.BasicPermission { 38 39 private static final long serialVersionUID = -8343910153355041693L; 40 41 /** 42 * Creates an instance of this class with the given name. 43 * 44 * @param name 45 * String the name of the new permission. 46 */ 47 public NetPermission(String name) { 48 super(name); 49 } 50 51 /** 52 * Creates an instance of this class with the given name and action list. 53 * The action list is ignored. 54 * 55 * @param name 56 * String the name of the new permission. 57 * @param actions 58 * String ignored. 59 */ 60 public NetPermission(String name, String actions) { 61 super(name, actions); 62 } 63} 64