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 permissions to configure the access to network
22 * resources.
23 * <p>
24 * There are three valid target names:
25 * <dl>
26 * <dt>setDefaultAuthenticator</dt>
27 * <dd>Allows the default authenticator to be set.</dd>
28 * <dt>requestPasswordAuthentication</dt>
29 * <dd>Allows the default authenticator to be retrieved.</dd>
30 * <dt>specifyStreamHandler</dt>
31 * <dd>Allows a stream (protocol) handler to be set when constructing an URL
32 * object</dd>
33 * </dl>
34 *
35 * @see java.security.BasicPermission
36 * @see SecurityManager
37 */
38public final class NetPermission extends java.security.BasicPermission {
39
40    private static final long serialVersionUID = -8343910153355041693L;
41
42    /**
43     * Creates an instance of this class with the given name.
44     *
45     * @param name
46     *            the name of the new NetPermission instance.
47     */
48    public NetPermission(String name) {
49        super(name);
50    }
51
52    /**
53     * Creates an instance of this class with the given name and an action list.
54     * The action list is ignored and should be {@code null}.
55     *
56     * @param name
57     *            the name of the new {@code NetPermission} instance.
58     * @param actions
59     *            the ignored action string.
60     */
61    public NetPermission(String name, String actions) {
62        super(name, actions);
63    }
64}
65