01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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:
18: package 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: */
37: public 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: }
|