policy.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 415 行 · 第 1/2 页
HTML
415 行
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract java.security.PermissionCollection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/Policy.html#getPermissions(javax.security.auth.Subject, java.security.CodeSource)">getPermissions</A></B>(<A HREF="../../../javax/security/auth/Subject.html">Subject</A> subject,
java.security.CodeSource cs)</CODE>
<BR>
Retrieve the Permissions granted to the Principals associated with
the specified <code>CodeSource</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../javax/security/auth/Policy.html">Policy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/Policy.html#getPolicy()">getPolicy</A></B>()</CODE>
<BR>
Returns the installed Policy object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/Policy.html#refresh()">refresh</A></B>()</CODE>
<BR>
Refresh and reload the Policy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/Policy.html#setPolicy(javax.security.auth.Policy)">setPolicy</A></B>(<A HREF="../../../javax/security/auth/Policy.html">Policy</A> policy)</CODE>
<BR>
Sets the system-wide Policy object.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="Policy()"><!-- --></A><H3>
Policy</H3>
<PRE>
protected <B>Policy</B>()</PRE>
<DL>
<DD>Sole constructor. (For invocation by subclass constructors, typically
implicit.)</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getPolicy()"><!-- --></A><H3>
getPolicy</H3>
<PRE>
public static <A HREF="../../../javax/security/auth/Policy.html">Policy</A> <B>getPolicy</B>()</PRE>
<DL>
<DD>Returns the installed Policy object.
This method first calls
<code>SecurityManager.checkPermission</code> with the
<code>AuthPermission("getPolicy")</code> permission
to ensure the caller has permission to get the Policy object.
<p><DD><DL>
<DT><B>Returns:</B><DD>the installed Policy. The return value can not be
<code>null</code>.<DT><B>Throws:</B><DD><CODE>java.lang.SecurityException</CODE> - if the current thread does not
have permission to get the Policy object.</DL>
</DD>
</DL>
<HR>
<A NAME="setPolicy(javax.security.auth.Policy)"><!-- --></A><H3>
setPolicy</H3>
<PRE>
public static void <B>setPolicy</B>(<A HREF="../../../javax/security/auth/Policy.html">Policy</A> policy)</PRE>
<DL>
<DD>Sets the system-wide Policy object. This method first calls
<code>SecurityManager.checkPermission</code> with the
<code>AuthPermission("setPolicy")</code>
permission to ensure the caller has permission to set the Policy.
<p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>policy</CODE> - the new system Policy object.<DT><B>Throws:</B><DD><CODE>java.lang.SecurityException</CODE> - if the current thread does not
have permission to set the Policy.</DL>
</DD>
</DL>
<HR>
<A NAME="getPermissions(javax.security.auth.Subject, java.security.CodeSource)"><!-- --></A><H3>
getPermissions</H3>
<PRE>
public abstract java.security.PermissionCollection <B>getPermissions</B>(<A HREF="../../../javax/security/auth/Subject.html">Subject</A> subject,
java.security.CodeSource cs)</PRE>
<DL>
<DD>Retrieve the Permissions granted to the Principals associated with
the specified <code>CodeSource</code>.
<p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>subject</CODE> - the <code>Subject</code>
whose associated Principals,
in conjunction with the provided
<code>CodeSource</code>, determines the Permissions
returned by this method. This parameter
may be <code>null</code>. <p><DD><CODE>cs</CODE> - the code specified by its <code>CodeSource</code>
that determines, in conjunction with the provided
<code>Subject</code>, the Permissions
returned by this method. This parameter may be
<code>null</code>.<DT><B>Returns:</B><DD>the Collection of Permissions granted to all the
<code>Subject</code> and code specified in
the provided <i>subject</i> and <i>cs</i>
parameters.</DL>
</DD>
</DL>
<HR>
<A NAME="refresh()"><!-- --></A><H3>
refresh</H3>
<PRE>
public abstract void <B>refresh</B>()</PRE>
<DL>
<DD>Refresh and reload the Policy.
<p>This method causes this object to refresh/reload its current
Policy. This is implementation-dependent.
For example, if the Policy object is stored in
a file, calling <code>refresh</code> will cause the file to be re-read.
<p><DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.SecurityException</CODE> - if the caller does not have permission
to refresh the Policy.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/security/auth/AuthPermission.html"><B>PREV CLASS</B></A>
<A HREF="../../../javax/security/auth/PrivateCredentialPermission.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="Policy.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?