subjectdomaincombiner.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 318 行

HTML
318 行
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Jan 17 03:51:37 PST 2002 -->
<TITLE>
Java 2 Platform EE v1.3: Class  SubjectDomainCombiner
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/security/auth/Subject.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SubjectDomainCombiner.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.security.auth</FONT>
<BR>
Class  SubjectDomainCombiner</H2>
<PRE>
java.lang.Object
  |
  +--<B>javax.security.auth.SubjectDomainCombiner</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.security.DomainCombiner</DD>
</DL>
<HR>
<DL>
<DT>public class <B>SubjectDomainCombiner</B><DT>extends java.lang.Object<DT>implements java.security.DomainCombiner</DL>

<P>
A <code>SubjectDomainCombiner</code> updates the
 ProtectionDomains affiliated with an <code>AccessControlContext</code>
 with the relevant Subject-based Permissions configured in the
 <code>java.security.auth.Policy</code>.

 <p> If the <code>Security</code> property, <i>cache.auth.policy</i>,
 either is not set, or if it is set to <i>true</i>, then this
 <code>SubjectDomainCombiner</code> implementation caches
 policy information.  Otherwise, this <code>SubjectDomainCombiner</code>
 implementation refrains from performing any caching.
 The <i>cache.auth.policy</i> property may be set in the Security
 properties file, located in the file named
 &lt;JAVA_HOME&gt;/lib/security/java.security, where &lt;JAVA_HOME&gt;
 refers to the directory where the SDK was installed.
<P>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/security/auth/SubjectDomainCombiner.html#SubjectDomainCombiner(javax.security.auth.Subject)">SubjectDomainCombiner</A></B>(<A HREF="../../../javax/security/auth/Subject.html">Subject</A>&nbsp;subject)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associate the provided <code>Subject</code> with this
 <code>SubjectDomainCombiner</code>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.security.ProtectionDomain[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/SubjectDomainCombiner.html#combine(java.security.ProtectionDomain[], java.security.ProtectionDomain[])">combine</A></B>(java.security.ProtectionDomain[]&nbsp;currentDomains,
        java.security.ProtectionDomain[]&nbsp;assignedDomains)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update the provided ProtectionDomains with the relevant
 Subject-based Permissions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/security/auth/Subject.html">Subject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/SubjectDomainCombiner.html#getSubject()">getSubject</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the <code>Subject</code> associated with this
 <code>SubjectDomainCombiner</code>.</TD>
</TR>
</TABLE>
&nbsp;<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>
&nbsp;
<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="SubjectDomainCombiner(javax.security.auth.Subject)"><!-- --></A><H3>
SubjectDomainCombiner</H3>
<PRE>
public <B>SubjectDomainCombiner</B>(<A HREF="../../../javax/security/auth/Subject.html">Subject</A>&nbsp;subject)</PRE>
<DL>
<DD>Associate the provided <code>Subject</code> with this
 <code>SubjectDomainCombiner</code>.

 <p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>subject</CODE> - the <code>Subject</code> to be associated with
		with this <code>SubjectDomainCombiner</code>.</DL>
</DD>
</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="getSubject()"><!-- --></A><H3>
getSubject</H3>
<PRE>
public <A HREF="../../../javax/security/auth/Subject.html">Subject</A> <B>getSubject</B>()</PRE>
<DL>
<DD>Get the <code>Subject</code> associated with this
 <code>SubjectDomainCombiner</code>.

 <p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the <code>Subject</code> associated with this
		<code>SubjectDomainCombiner</code>, or <code>null</code>
		if no <code>Subject</code> is associated with this
		<code>SubjectDomainCombiner</code>.<DT><B>Throws:</B><DD><CODE>java.lang.SecurityException</CODE> - if the caller does not have permission
		to get the <code>Subject</code> associated with this
		<code>SubjectDomainCombiner</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="combine(java.security.ProtectionDomain[], java.security.ProtectionDomain[])"><!-- --></A><H3>
combine</H3>
<PRE>
public java.security.ProtectionDomain[] <B>combine</B>(java.security.ProtectionDomain[]&nbsp;currentDomains,
                                                java.security.ProtectionDomain[]&nbsp;assignedDomains)</PRE>
<DL>
<DD>Update the provided ProtectionDomains with the relevant
 Subject-based Permissions.

 <p> For each <code>ProtectionDomain</code> in the
 <i>currentDomains</i> array, this method retrieves the
 Subject-based permissions granted in the <code>Policy</code>.
 To retrieve these permissions, this method invokes the
 <code>getPermissions</code> method from the <code>Policy</code>,
 passing it the <code>Subject</code> associated with this
 <code>SubjectDomainCombiner</code>, along with the
 <code>CodeSource</code> associated with the respective
 <code>ProtectionDomain</code>.
 A new collection of Permissions is created from the union of the
 retrieved Permissions and the original Permissions granted to that
 <code>ProtectionDomain</code>.  A new
 <code>ProtectionDomain</code> is then instantiated
 with this new collection of Permissions, as well as the
 <code>CodeSource</code> from the original <code>ProtectionDomain</code>.
 All of the newly instantiated ProtectionDomains are then
 combined into a new array.  The ProtectionDomains from the
 <i>assignedDomains</i> array are appended to this new array,
 and the result is returned.

 <p> Note that optimizations such as the removal of duplicate entries
 in the array, or the removal of duplicate Permissions in a
 <code>ProtectionDomain</code> entry may have occurred.
 Also note that if caching is permitted and the relevant
 Permissions were already cached, this method does not need to consult
 the <code>Policy</code> to retrieve the Subject-based permissions.
 It simply accesses the cached permissions.

 <p><DD><DL>
<DT><B>Specified by: </B><DD><CODE>combine</CODE> in interface <CODE>java.security.DomainCombiner</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>currentDomains</CODE> - the ProtectionDomains associated with the
		current execution Thread, up to the most recent
		privileged <code>ProtectionDomain</code>.
		The ProtectionDomains are are listed in order of execution,
		with the most recently executing <code>ProtectionDomain</code>
		residing at the beginning of the array. This parameter may
		be <code>null</code> if the current execution Thread
		has no associated ProtectionDomains.<p><DD><CODE>assignedDomains</CODE> - the ProtectionDomains inherited from the
		parent Thread, or the ProtectionDomains from the
		privileged <i>context</i>, if a call to
		AccessController.doPrivileged(..., <i>context</i>)
		had occurred  This parameter may be <code>null</code>
		if there were no ProtectionDomains inherited from the
		parent Thread, or from the privileged <i>context</i>.<DT><B>Returns:</B><DD>a new array consisting of the updated ProtectionDomains,
		or <code>null</code>.</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/security/auth/Subject.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SubjectDomainCombiner.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?