URLPermission class in Java

java.net.URLPermission

Represents permission to access a resource or set of resources defined by a given url, and for a given set of user-set table request methods and request headers. The name of the permission is the url string. The actions string is a concatenation of the request methods and headers. The range of methods and header names is not restricted by this class.

Some methods of URLPermission class

URLPermission(String)This method creates a URLPermission with the given url string and unrestricted methods and requests headers by invoking the two-argument constructor as follows: URLPermission(url, "*:*")

URLPermission(String, String)This method creates a new URL permission from a url string and permits the given request methods and user-settable request headers.

equals(Object)his method returns true if, this.getActions().equals(p.getActions())and p's url equals this's url. Returns false otherwise.

getActions()This method returns the normalized method list and requests a header list, in the form: "method-names: header-names".

hashCode()This method returns a hashcode calculated from the hashcode of the actions String and the url string.

implies(Permission)This method checks if this URLPermission implies some of the permissions.

No comments:

Post a Comment