public class DefaultPolicyParser extends Object implements PolicyParser
PermissionGrant's
.
For details of policy format, which should be identical to Sun's Java Policy
files see the
default policy description
.
parse()
,
which performs the main task.
Extensions of this parser may redefine specific operations separately,
by overriding corresponding protected methods.
ConcurrentPolicyFile
,
DefaultPolicyScanner
,
PermissionGrant
Constructor and Description |
---|
DefaultPolicyParser()
Default constructor,
DefaultPolicyScanner
is used. |
Modifier and Type | Method and Description |
---|---|
Collection<PermissionGrant> |
parse(URL location,
Properties system)
This is the main business method.
|
public DefaultPolicyParser()
DefaultPolicyScanner
is used.public Collection<PermissionGrant> parse(URL location, Properties system) throws Exception
composite tokens
,
then this set is iterated and each token is translated to a PermissionGrant.
Semantically invalid tokens are ignored, the same as void PermissionGrant's.
parse
in interface PolicyParser
location
- an URL of a policy file to be loadedsystem
- system properties, used for property expansionException
- IO error while reading location or file syntax errorCopyright © 2016–2018 The Apache Software Foundation. All rights reserved.