⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 authenticator.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!-- ============ 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="Authenticator()"><!-- --></A><H3>Authenticator</H3><PRE>public <B>Authenticator</B>()</PRE><DL></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="setDefault(java.net.Authenticator)"><!-- --></A><H3>setDefault</H3><PRE>public static void <B>setDefault</B>(<A HREF="../../java/net/Authenticator.html">Authenticator</A>&nbsp;a)</PRE><DL><DD>Sets the authenticator that will be used by the networking code when a proxy or an HTTP server asks for authenticator. If an Authenticator has already been established as the current authenticator, no action will be taken. If the argument is <code>null</code> and no authenticator has been established, then no action is taken and the method simply returns. <p> First, if there is a security manager, its <code>checkPermission</code>  method is called with a  <code>NetPermission("setDefaultAuthenticator")</code> permission. This may result in a java.lang.SecurityException.  <p> Typically, this method will be called exactly once, at system startup.<DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - The authenticator<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its         <code>checkPermission</code> method doesn't allow         setting the default authenticator.<DT><B>See Also: </B><DD><A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A>, <A HREF="../../java/net/NetPermission.html"><CODE>NetPermission</CODE></A></DL></DD></DL><HR><A NAME="requestPasswordAuthentication(java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>requestPasswordAuthentication</H3><PRE>public static <A HREF="../../java/net/PasswordAuthentication.html">PasswordAuthentication</A> <B>requestPasswordAuthentication</B>(<A HREF="../../java/net/InetAddress.html">InetAddress</A>&nbsp;addr,                                                                   int&nbsp;port,                                                                   <A HREF="../../java/lang/String.html">String</A>&nbsp;protocol,                                                                   <A HREF="../../java/lang/String.html">String</A>&nbsp;prompt,                                                                   <A HREF="../../java/lang/String.html">String</A>&nbsp;scheme)</PRE><DL><DD>Ask the authenticator that has been registered with the system for a password. <p> First, if there is a security manager, its <code>checkPermission</code>  method is called with a  <code>NetPermission("requestPasswordAuthentication")</code> permission. This may result in a java.lang.SecurityException.<DD><DL><DT><B>Parameters:</B><DD><CODE>addr</CODE> - The InetAddress of the site requesting authorization,             or null if not known.<DD><CODE>port</CODE> - the port for the requested connection<DD><CODE>protocol</CODE> - The protocol that's requesting the connection          (<CODE>java.net.Authenticator#getProtocol()</CODE>)<DD><CODE>prompt</CODE> - A prompt string for the user<DD><CODE>scheme</CODE> - The authentication scheme<DT><B>Returns:</B><DD>The username/password, or null if one can't be gotten.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its         <code>checkPermission</code> method doesn't allow         the password authentication request.<DT><B>See Also: </B><DD><A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A>, <A HREF="../../java/net/NetPermission.html"><CODE>NetPermission</CODE></A></DL></DD></DL><HR><A NAME="getRequestingSite()"><!-- --></A><H3>getRequestingSite</H3><PRE>protected final <A HREF="../../java/net/InetAddress.html">InetAddress</A> <B>getRequestingSite</B>()</PRE><DL><DD>Gets the <code>InetAddress</code> of the site requesting authorization, or <code>null</code> if not available.<DD><DL><DT><B>Returns:</B><DD>the InetAddress of the site requesting authorization, or null		if it's not available.</DL></DD></DL><HR><A NAME="getRequestingPort()"><!-- --></A><H3>getRequestingPort</H3><PRE>protected final int <B>getRequestingPort</B>()</PRE><DL><DD>Gets the port number for the requested connection.<DD><DL><DT><B>Returns:</B><DD>an <code>int</code> indicating the  port for the requested connection.</DL></DD></DL><HR><A NAME="getRequestingProtocol()"><!-- --></A><H3>getRequestingProtocol</H3><PRE>protected final <A HREF="../../java/lang/String.html">String</A> <B>getRequestingProtocol</B>()</PRE><DL><DD>Give the protocol that's requesting the connection.  Often this will be based on a URL, but in a future SDK it could be, for example, "SOCKS" for a password-protected SOCKS5 firewall.<DD><DL><DT><B>Returns:</B><DD>the protcol, optionally followed by "/version", where		version is a version number.<DT><B>See Also: </B><DD><A HREF="../../java/net/URL.html#getProtocol()"><CODE>URL.getProtocol()</CODE></A></DL></DD></DL><HR><A NAME="getRequestingPrompt()"><!-- --></A><H3>getRequestingPrompt</H3><PRE>protected final <A HREF="../../java/lang/String.html">String</A> <B>getRequestingPrompt</B>()</PRE><DL><DD>Gets the prompt string given by the requestor.<DD><DL><DT><B>Returns:</B><DD>the prompt string given by the requestor (realm for		http requests)</DL></DD></DL><HR><A NAME="getRequestingScheme()"><!-- --></A><H3>getRequestingScheme</H3><PRE>protected final <A HREF="../../java/lang/String.html">String</A> <B>getRequestingScheme</B>()</PRE><DL><DD>Gets the scheme of the requestor (the HTTP scheme for an HTTP firewall, for example).<DD><DL><DT><B>Returns:</B><DD>the scheme of the requestor</DL></DD></DL><HR><A NAME="getPasswordAuthentication()"><!-- --></A><H3>getPasswordAuthentication</H3><PRE>protected <A HREF="../../java/net/PasswordAuthentication.html">PasswordAuthentication</A> <B>getPasswordAuthentication</B>()</PRE><DL><DD>Called when password authorization is needed.  Subclasses should override the default implementation, which returns null.<DD><DL><DT><B>Returns:</B><DD>The PasswordAuthentication collected from the		user, or null if none is provided.</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="class-use/Authenticator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../java/net/ContentHandler.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>  &nbsp;&nbsp;<A HREF="Authenticator.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><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

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