<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!-- NewPage --> | |
<html lang="en"> | |
<head> | |
<!-- Generated by javadoc (1.8.0) on Sun Aug 28 20:41:45 EST 2016 --> | |
<title>DynamicPolicy (Apache River v3.0.0 Specification-only API Documentation)</title> | |
<meta name="date" content="2016-08-28"> | |
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> | |
<script type="text/javascript" src="../../../../script.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"><!-- | |
try { | |
if (location.href.indexOf('is-external=true') == -1) { | |
parent.document.title="DynamicPolicy (Apache River v3.0.0 Specification-only API Documentation)"; | |
} | |
} | |
catch(err) { | |
} | |
//--> | |
var methods = {"i0":6,"i1":6,"i2":6}; | |
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; | |
var altColor = "altColor"; | |
var rowColor = "rowColor"; | |
var tableTab = "tableTab"; | |
var activeTableTab = "activeTableTab"; | |
</script> | |
<noscript> | |
<div>JavaScript is disabled on your browser.</div> | |
</noscript> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<div class="topNav"><a name="navbar.top"> | |
<!-- --> | |
</a> | |
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> | |
<a name="navbar.top.firstrow"> | |
<!-- --> | |
</a> | |
<ul class="navList" title="Navigation"> | |
<li><a href="../../../../overview-summary.html">Overview</a></li> | |
<li><a href="package-summary.html">Package</a></li> | |
<li class="navBarCell1Rev">Class</li> | |
<li><a href="class-use/DynamicPolicy.html">Use</a></li> | |
<li><a href="package-tree.html">Tree</a></li> | |
<li><a href="../../../../deprecated-list.html">Deprecated</a></li> | |
<li><a href="../../../../index-all.html">Index</a></li> | |
<li><a href="../../../../help-doc.html">Help</a></li> | |
</ul> | |
</div> | |
<div class="subNav"> | |
<ul class="navList"> | |
<li>Prev Class</li> | |
<li><a href="../../../../net/jini/security/policy/DynamicPolicyProvider.html" title="class in net.jini.security.policy"><span class="typeNameLink">Next Class</span></a></li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../../index.html?net/jini/security/policy/DynamicPolicy.html" target="_top">Frames</a></li> | |
<li><a href="DynamicPolicy.html" target="_top">No Frames</a></li> | |
</ul> | |
<ul class="navList" id="allclasses_navbar_top"> | |
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> | |
</ul> | |
<div> | |
<script type="text/javascript"><!-- | |
allClassesLink = document.getElementById("allclasses_navbar_top"); | |
if(window==top) { | |
allClassesLink.style.display = "block"; | |
} | |
else { | |
allClassesLink.style.display = "none"; | |
} | |
//--> | |
</script> | |
</div> | |
<div> | |
<ul class="subNavList"> | |
<li>Summary: </li> | |
<li>Nested | </li> | |
<li>Field | </li> | |
<li>Constr | </li> | |
<li><a href="#method.summary">Method</a></li> | |
</ul> | |
<ul class="subNavList"> | |
<li>Detail: </li> | |
<li>Field | </li> | |
<li>Constr | </li> | |
<li><a href="#method.detail">Method</a></li> | |
</ul> | |
</div> | |
<a name="skip.navbar.top"> | |
<!-- --> | |
</a></div> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<div class="header"> | |
<div class="subTitle">net.jini.security.policy</div> | |
<h2 title="Interface DynamicPolicy" class="title">Interface DynamicPolicy</h2> | |
</div> | |
<div class="contentContainer"> | |
<div class="description"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<dl> | |
<dt>All Known Implementing Classes:</dt> | |
<dd><a href="../../../../net/jini/security/policy/DynamicPolicyProvider.html" title="class in net.jini.security.policy">DynamicPolicyProvider</a></dd> | |
</dl> | |
<hr> | |
<br> | |
<pre>public interface <span class="typeNameLabel">DynamicPolicy</span></pre> | |
<div class="block">Interface implemented by security policy providers that may support dynamic | |
granting of permissions at run-time. The <code>grant</code> methods of the | |
<a href="../../../../net/jini/security/Security.html" title="class in net.jini.security"><code>Security</code></a> class delegate to the | |
methods declared by this interface when this interface is implemented by the | |
installed security policy provider. Permissions are granted on the | |
granularity of class loader; granting a permission requires (of the calling | |
context) <a href="../../../../net/jini/security/GrantPermission.html" title="class in net.jini.security"><code>GrantPermission</code></a> for that | |
permission.</div> | |
<dl> | |
<dt><span class="simpleTagLabel">Since:</span></dt> | |
<dd>2.0</dd> | |
<dt><span class="simpleTagLabel">Author:</span></dt> | |
<dd>Sun Microsystems, Inc.</dd> | |
</dl> | |
</li> | |
</ul> | |
</div> | |
<div class="summary"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<!-- ========== METHOD SUMMARY =========== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="method.summary"> | |
<!-- --> | |
</a> | |
<h3>Method Summary</h3> | |
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> | |
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> | |
<tr> | |
<th class="colFirst" scope="col">Modifier and Type</th> | |
<th class="colLast" scope="col">Method and Description</th> | |
</tr> | |
<tr id="i0" class="altColor"> | |
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/security/Permission.html?is-external=true" title="class or interface in java.security">Permission</a>[]</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/jini/security/policy/DynamicPolicy.html#getGrants-java.lang.Class-java.security.Principal:A-">getGrants</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> cl, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/security/Principal.html?is-external=true" title="class or interface in java.security">Principal</a>[] principals)</code> | |
<div class="block">If this security policy provider supports dynamic permission grants, | |
returns a new array containing the cumulative set of permissions | |
dynamically granted to protection domains (including ones not yet | |
created) that are associated with the class loader of the given class | |
and possess at least the given set of principals.</div> | |
</td> | |
</tr> | |
<tr id="i1" class="rowColor"> | |
<td class="colFirst"><code>void</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/jini/security/policy/DynamicPolicy.html#grant-java.lang.Class-java.security.Principal:A-java.security.Permission:A-">grant</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> cl, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/security/Principal.html?is-external=true" title="class or interface in java.security">Principal</a>[] principals, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/security/Permission.html?is-external=true" title="class or interface in java.security">Permission</a>[] permissions)</code> | |
<div class="block">If this security policy provider supports dynamic permission grants, | |
grants the specified permissions to all protection domains (including | |
ones not yet created) that are associated with the class loader of the | |
given class and possess at least the given set of principals.</div> | |
</td> | |
</tr> | |
<tr id="i2" class="altColor"> | |
<td class="colFirst"><code>boolean</code></td> | |
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/jini/security/policy/DynamicPolicy.html#grantSupported--">grantSupported</a></span>()</code> | |
<div class="block">Returns <code>true</code> if this policy provider supports dynamic | |
permission grants; returns <code>false</code> otherwise.</div> | |
</td> | |
</tr> | |
</table> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
</div> | |
<div class="details"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<!-- ============ METHOD DETAIL ========== --> | |
<ul class="blockList"> | |
<li class="blockList"><a name="method.detail"> | |
<!-- --> | |
</a> | |
<h3>Method Detail</h3> | |
<a name="grantSupported--"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>grantSupported</h4> | |
<pre>boolean grantSupported()</pre> | |
<div class="block">Returns <code>true</code> if this policy provider supports dynamic | |
permission grants; returns <code>false</code> otherwise. Note that this | |
method may return different values for a given | |
<code>DynamicPolicy</code> instance, depending on context. For example, | |
a policy provider that delegates to different underlying policy | |
implementations depending on thread state would return <code>true</code> | |
from this method when the current delegate supports dynamic permission | |
grants, but return <code>false</code> when another delegate lacking such | |
support is in effect.</div> | |
<dl> | |
<dt><span class="returnLabel">Returns:</span></dt> | |
<dd><code>true</code> if policy supports dynamic permission grants | |
under current context, <code>false</code> otherwise</dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="grant-java.lang.Class-java.security.Principal:A-java.security.Permission:A-"> | |
<!-- --> | |
</a> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<h4>grant</h4> | |
<pre>void grant(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> cl, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/security/Principal.html?is-external=true" title="class or interface in java.security">Principal</a>[] principals, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/security/Permission.html?is-external=true" title="class or interface in java.security">Permission</a>[] permissions)</pre> | |
<div class="block">If this security policy provider supports dynamic permission grants, | |
grants the specified permissions to all protection domains (including | |
ones not yet created) that are associated with the class loader of the | |
given class and possess at least the given set of principals. If the | |
given class is <code>null</code>, then the grant applies across all | |
protection domains that possess at least the specified principals. If | |
the list of principals is <code>null</code> or empty, then principals | |
are effectively ignored in determining the protection domains to which | |
the grant applies. If this policy provider does not support dynamic | |
permission grants, then no permissions are granted and an | |
<code>UnsupportedOperationException</code> is thrown. | |
<p> | |
The given class, if non-<code>null</code>, must belong to either the | |
system domain or a protection domain whose associated class loader is | |
non-<code>null</code>. If the class does not belong to such a | |
protection domain, then no permissions are granted and an | |
<code>UnsupportedOperationException</code> is thrown. | |
<p> | |
If a security manager is installed, its <code>checkPermission</code> | |
method is called with a <code>GrantPermission</code> containing the | |
permissions to grant; if the permission check fails, then no permissions | |
are granted and the resulting <code>SecurityException</code> is thrown. | |
The principals and permissions arrays passed in are neither modified nor | |
retained; subsequent changes to the arrays have no effect on the grant | |
operation.</div> | |
<dl> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>cl</code> - class to grant permissions to the class loader of, or | |
<code>null</code> if granting across all class loaders</dd> | |
<dd><code>principals</code> - if non-<code>null</code>, minimum set of principals | |
to which grants apply</dd> | |
<dd><code>permissions</code> - if non-<code>null</code>, permissions to grant</dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if policy does not support | |
dynamic grants, or if <code>cl</code> is non-<code>null</code> | |
and belongs to a protection domain with a <code>null</code> | |
class loader other than the system domain</dd> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - if a security manager is installed and the | |
calling context does not have sufficient permissions to grant | |
the given permissions</dd> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if any element of the principals or | |
permissions arrays is <code>null</code></dd> | |
</dl> | |
</li> | |
</ul> | |
<a name="getGrants-java.lang.Class-java.security.Principal:A-"> | |
<!-- --> | |
</a> | |
<ul class="blockListLast"> | |
<li class="blockList"> | |
<h4>getGrants</h4> | |
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/security/Permission.html?is-external=true" title="class or interface in java.security">Permission</a>[] getGrants(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> cl, | |
<a href="http://docs.oracle.com/javase/6/docs/api/java/security/Principal.html?is-external=true" title="class or interface in java.security">Principal</a>[] principals)</pre> | |
<div class="block">If this security policy provider supports dynamic permission grants, | |
returns a new array containing the cumulative set of permissions | |
dynamically granted to protection domains (including ones not yet | |
created) that are associated with the class loader of the given class | |
and possess at least the given set of principals. If the given class is | |
<code>null</code>, then this method returns the cumulative set of | |
permissions dynamically granted across all protection domains that | |
possess at least the specified principals (i.e., through calls to the | |
grant method where the specified class was <code>null</code>). If the | |
list of principals is <code>null</code> or empty, then the permissions | |
returned reflect only grants not qualified by principals (i.e., those | |
performed through calls to the grant method where the specified | |
principals array was <code>null</code> or empty). If this policy | |
provider does not support dynamic permission grants, then an | |
<code>UnsupportedOperationException</code> is thrown. | |
<p> | |
The given class, if non-<code>null</code>, must belong to either the | |
system domain or a protection domain whose associated class loader is | |
non-<code>null</code>. If the class does not belong to such a | |
protection domain, then an <code>UnsupportedOperationException</code> is | |
thrown.</div> | |
<dl> | |
<dt><span class="paramLabel">Parameters:</span></dt> | |
<dd><code>cl</code> - class to query the permissions dynamically granted to the | |
class loader of, or <code>null</code> if querying permissions | |
granted across all class loaders</dd> | |
<dd><code>principals</code> - if non-<code>null</code>, principals to query | |
dynamic grants for</dd> | |
<dt><span class="returnLabel">Returns:</span></dt> | |
<dd>new array containing the permissions dynamically granted to the | |
indicated class loader (if any) and principals</dd> | |
<dt><span class="throwsLabel">Throws:</span></dt> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if policy does not support | |
dynamic grants, or if <code>cl</code> is non-<code>null</code> | |
and belongs to a protection domain with a <code>null</code> | |
class loader other than the system domain</dd> | |
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if any element of the principals array is | |
<code>null</code></dd> | |
</dl> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<div class="bottomNav"><a name="navbar.bottom"> | |
<!-- --> | |
</a> | |
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> | |
<a name="navbar.bottom.firstrow"> | |
<!-- --> | |
</a> | |
<ul class="navList" title="Navigation"> | |
<li><a href="../../../../overview-summary.html">Overview</a></li> | |
<li><a href="package-summary.html">Package</a></li> | |
<li class="navBarCell1Rev">Class</li> | |
<li><a href="class-use/DynamicPolicy.html">Use</a></li> | |
<li><a href="package-tree.html">Tree</a></li> | |
<li><a href="../../../../deprecated-list.html">Deprecated</a></li> | |
<li><a href="../../../../index-all.html">Index</a></li> | |
<li><a href="../../../../help-doc.html">Help</a></li> | |
</ul> | |
</div> | |
<div class="subNav"> | |
<ul class="navList"> | |
<li>Prev Class</li> | |
<li><a href="../../../../net/jini/security/policy/DynamicPolicyProvider.html" title="class in net.jini.security.policy"><span class="typeNameLink">Next Class</span></a></li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../../index.html?net/jini/security/policy/DynamicPolicy.html" target="_top">Frames</a></li> | |
<li><a href="DynamicPolicy.html" target="_top">No Frames</a></li> | |
</ul> | |
<ul class="navList" id="allclasses_navbar_bottom"> | |
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> | |
</ul> | |
<div> | |
<script type="text/javascript"><!-- | |
allClassesLink = document.getElementById("allclasses_navbar_bottom"); | |
if(window==top) { | |
allClassesLink.style.display = "block"; | |
} | |
else { | |
allClassesLink.style.display = "none"; | |
} | |
//--> | |
</script> | |
</div> | |
<div> | |
<ul class="subNavList"> | |
<li>Summary: </li> | |
<li>Nested | </li> | |
<li>Field | </li> | |
<li>Constr | </li> | |
<li><a href="#method.summary">Method</a></li> | |
</ul> | |
<ul class="subNavList"> | |
<li>Detail: </li> | |
<li>Field | </li> | |
<li>Constr | </li> | |
<li><a href="#method.detail">Method</a></li> | |
</ul> | |
</div> | |
<a name="skip.navbar.bottom"> | |
<!-- --> | |
</a></div> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
</body> | |
</html> |