Skip to Content
Java Security
book

Java Security

by Scott Oaks
May 1998
Intermediate to advanced
469 pages
14h 57m
English
O'Reilly Media, Inc.
Content preview from Java Security

Name

Class java.security.Permission

Synopsis

This class forms the base class for all types of permissions that are used by the access controller. A permission object encapsulates a particular operation (e.g., reading the file /tmp/foo). It does not, however, grant permission for that operation; rather, the permission object is constructed and passed to the access controller to see if that operation is one which the current security policy has defined as a permissible operation.

Permissions have names (e.g., the name of the file, or the name of the operation) and may optionally have actions (the semantics of which are dependent upon the type of permission). It is up to the implies() method to determine if one permission grants another; this allows you to specify wildcard-type permissions that imply specific permissions (e.g., the permission named “*” may imply the permission named “myfile”).

Class Definition

public abstract class java.security.Permission
	extends java.lang.Object
	implements java.security.Guard, java.io.Serializable {

	// Constructors
	public Permission(String);

	// Instance Methods
	public void checkGuard(Object);
	public abstract boolean equals(Object);
	public abstract String getActions();
	public final String getName();
	public abstract int hashCode();
	public abstract boolean isReadOnly();
	public void setReadOnly();
	public PermissionCollection newPermissionCollection();
	public String toString();
}

See also:

AccessController, BasicPermission, PermissionCollection, Policy

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Security Handbook

Java Security Handbook

Jamie Jaworski, Paul J. Perrone, Venkata S.R. Krishna Chaganti

Publisher Resources

ISBN: 1565924037Supplemental ContentCatalog PageErrata