![]()
|
|
|||||||||||||
Class PropertyAccessRequestpublic class PropertyAccessRequest implements ISecurityRequest { // Fields public static final int ALL; public static final int INDIVIDUAL; // Constructors public PropertyAccessRequest (int type,String param); public PropertyAccessRequest(); public PropertyAccessRequest (String prop); // Methods public PermissionID getPermissionID(); public String toString (); } This class represents a request to access the system properties. Use an instance of this class as the security request object for a parameterized security check involving the system properties permission. The PropertyPermission.check method expects a PropertyAccessRequest object as its parameter. The following example shows how to use a PropertyAccessRequest object to perform a security check.
...
// Create a PropertyAccessRequest object that indicates
// that you want to read the system property called
// java.class.path.
PropertyAccessRequest sreq =
new PropertyAccessRequest("java.class.path");
// Check to see that all of your callers have the
// rights to read that system property.
PolicyEngine.checkPermission(sreq);
...
For more information about checking system properties, see the PolicyEngine class and the PropertyPermission class. ConstructorsPropertyAccessRequestpublic PropertyAccessRequest (int type,String param); PropertyAccessRequestpublic PropertyAccessRequest(); PropertyAccessRequestpublic PropertyAccessRequest (String prop); MethodsgetPermissionIDpublic PermissionID getPermissionID(); toStringpublic String toString (); Fields
|
| © 1998 Microsoft Corporation. All rights reserved. Terms of use. |