📄 policycontexthandler.html
字号:
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="supports(java.lang.String)"><!-- --></A><H3>supports</H3><PRE>boolean <B>supports</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> key) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>This public method returns a boolean result indicating whether or not the handler supports the context object identified by the (case-sensitive) key value.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - a <code>String</code> value identifying a context object that could be supported by the handler. The value of this parameter must not be null.<DT><B>Returns:</B><DD>a boolean indicating whether or not the context object corresponding to the argument key is handled by the handler.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException</DL></DD></DL><HR><A NAME="getKeys()"><!-- --></A><H3>getKeys</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getKeys</B>() throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>This public method returns the keys identifying the context objects supported by the handler. The value of each key supported by a handler must be a non-null <code>String</code> value.<P><DD><DL><DT><B>Returns:</B><DD>an array containing <code>String</code> values identifing the context objects supported by the handler. The array must not contain duplicate key values. In the unlikely case that the Handler supports no keys, the handler must return a zero length array. The value null must never be returned by this method.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException</DL></DD></DL><HR><A NAME="getContext(java.lang.String, java.lang.Object)"><!-- --></A><H3>getContext</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getContext</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> key, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> data) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>This public method is used by the <code>PolicyContext</code> class to activate the handler and obtain from it the context object identified by the (case-sensitive) key. In addition to the key, the handler will be activated with the handler data value associated within the <code>PolicyContext</code> class with the thread on which the call to this method is made. <P> Note that the policy context identifier associated with a thread is available to the handler by calling PolicyContext.getContextID(). <P><P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - a String that identifies the context object to be returned by the handler. The value of this paramter must not be null.<DD><CODE>data</CODE> - the handler data <code>Object</code> associated with the thread on which the call to this method has been made. Note that the value passed through this parameter may be <code>null</code>.<DT><B>Returns:</B><DD>The container and handler specific <code>Object</code> containing the desired context. A <code>null</code> value may be returned if the value of the corresponding context is null.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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/jacc/PolicyContextException.html" title="class in javax.security.jacc"><B>PREV CLASS</B></A> <A HREF="../../../javax/security/jacc/WebResourcePermission.html" title="class in javax.security.jacc"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/security/jacc/PolicyContextHandler.html" target="_top"><B>FRAMES</B></A> <A HREF="PolicyContextHandler.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -