19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package jdk.net; 27 28 import java.security.BasicPermission; 29 30 /** 31 * Represents permission to access the extended networking capabilities 32 * defined in the jdk.net package. These permissions contain a target 33 * name, but no actions list. Callers either possess the permission or not. 34 * <p> 35 * The following targets are defined: 36 * 37 * <table class="striped"><caption style="display:none">permission target name, 38 * what the target allows,and associated risks</caption> 39 * <tr> 40 * <th>Permission Target Name</th> 41 * <th>What the Permission Allows</th> 42 * <th>Risks of Allowing this Permission</th> 43 * </tr> 44 * <tr> 45 * <td>setOption.SO_FLOW_SLA</td> 46 * <td>set the {@link ExtendedSocketOptions#SO_FLOW_SLA SO_FLOW_SLA} option 47 * on any socket that supports it</td> 48 * <td>allows caller to set a higher priority or bandwidth allocation 49 * to sockets it creates, than they might otherwise be allowed.</td> 50 * </tr> 51 * <tr> 52 * <td>getOption.SO_FLOW_SLA</td> 53 * <td>retrieve the {@link ExtendedSocketOptions#SO_FLOW_SLA SO_FLOW_SLA} 54 * setting from any socket that supports the option</td> 55 * <td>allows caller access to SLA information that it might not 56 * otherwise have</td> 57 * </tr></table> 58 * 59 * @see jdk.net.ExtendedSocketOptions 60 * 61 * @since 1.8 62 */ 63 64 public final class NetworkPermission extends BasicPermission { 65 66 private static final long serialVersionUID = -2012939586906722291L; 67 68 /** 69 * Creates a NetworkPermission with the given target name. 70 * 71 * @param name the permission target name 72 * @throws NullPointerException if {@code name} is {@code null}. 73 * @throws IllegalArgumentException if {@code name} is empty. 74 */ 75 public NetworkPermission(String name) 76 { 77 super(name); | 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package jdk.net; 27 28 import java.security.BasicPermission; 29 30 /** 31 * Represents permission to access the extended networking capabilities 32 * defined in the jdk.net package. These permissions contain a target 33 * name, but no actions list. Callers either possess the permission or not. 34 * <p> 35 * The following targets are defined: 36 * 37 * <table class="striped"><caption style="display:none">permission target name, 38 * what the target allows,and associated risks</caption> 39 * <thead> 40 * <tr> 41 * <th scope="col">Permission Target Name</th> 42 * <th scope="col">What the Permission Allows</th> 43 * <th scope="col">Risks of Allowing this Permission</th> 44 * </tr> 45 * </thead> 46 * <tbody> 47 * <tr> 48 * <th scope="row">setOption.SO_FLOW_SLA</th> 49 * <td>set the {@link ExtendedSocketOptions#SO_FLOW_SLA SO_FLOW_SLA} option 50 * on any socket that supports it</td> 51 * <td>allows caller to set a higher priority or bandwidth allocation 52 * to sockets it creates, than they might otherwise be allowed.</td> 53 * </tr> 54 * <tr> 55 * <th scope="row">getOption.SO_FLOW_SLA</th> 56 * <td>retrieve the {@link ExtendedSocketOptions#SO_FLOW_SLA SO_FLOW_SLA} 57 * setting from any socket that supports the option</td> 58 * <td>allows caller access to SLA information that it might not 59 * otherwise have</td> 60 * </tr> 61 * </tbody> 62 * </table> 63 * 64 * @see jdk.net.ExtendedSocketOptions 65 * 66 * @since 1.8 67 */ 68 69 public final class NetworkPermission extends BasicPermission { 70 71 private static final long serialVersionUID = -2012939586906722291L; 72 73 /** 74 * Creates a NetworkPermission with the given target name. 75 * 76 * @param name the permission target name 77 * @throws NullPointerException if {@code name} is {@code null}. 78 * @throws IllegalArgumentException if {@code name} is empty. 79 */ 80 public NetworkPermission(String name) 81 { 82 super(name); |