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

📄 session.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a closed Folder object for the given URLName. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getInstance(java.util.Properties)">getInstance</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a new Session object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getInstance(java.util.Properties, javax.mail.Authenticator)">getInstance</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A>&nbsp;props,            <A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;authenticator)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a new Session object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getPasswordAuthentication(javax.mail.URLName)">getPasswordAuthentication</A></B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return any saved PasswordAuthentication for this (store or transport) URLName.  </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getProperties()">getProperties</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Properties object associated with this Session</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getProperty(java.lang.String)">getProperty</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the specified property. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getProvider(java.lang.String)">getProvider</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;protocol)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the default Provider for the protocol specified. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getProviders()">getProviders</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns an array of all the implementations installed  via the javamail.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getStore()">getStore</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Store object that implements this user's desired Store protocol. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getStore(javax.mail.Provider)">getStore</A></B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an instance of the store specified by Provider. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getStore(java.lang.String)">getStore</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;protocol)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Store object that implements the specified protocol. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getStore(javax.mail.URLName)">getStore</A></B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Store object for the given URLName. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getTransport()">getTransport</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Transport object that implements this user's desired  Transport protcol. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getTransport(javax.mail.Address)">getTransport</A></B>(<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Transport object that can transport a Message to the specified address type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getTransport(javax.mail.Provider)">getTransport</A></B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an instance of the transport specified in the Provider. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getTransport(java.lang.String)">getTransport</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;protocol)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Transport object that implements the specified protocol. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#getTransport(javax.mail.URLName)">getTransport</A></B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Transport object for the given URLName. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#requestPasswordAuthentication(java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String)">requestPasswordAuthentication</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/InetAddress.html" title="class or interface in java.net">InetAddress</A>&nbsp;addr,                              int&nbsp;port,                              <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;protocol,                              <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;prompt,                              <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;defaultUserName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call back to the application to get the needed user name and password. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#setDebug(boolean)">setDebug</A></B>(boolean&nbsp;debug)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the debug setting for this Session. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#setDebugOut(java.io.PrintStream)">setDebugOut</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/PrintStream.html" title="class or interface in java.io">PrintStream</A>&nbsp;out)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the stream to be used for debugging output for this session. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#setPasswordAuthentication(javax.mail.URLName, javax.mail.PasswordAuthentication)">setPasswordAuthentication</A></B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url,                          <A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A>&nbsp;pw)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save a PasswordAuthentication for this (store or transport) URLName. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Session.html#setProvider(javax.mail.Provider)">setProvider</A></B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the passed Provider to be the default implementation for the protocol in Provider.protocol overriding any previous values.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getInstance(java.util.Properties, javax.mail.Authenticator)"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A> <B>getInstance</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A>&nbsp;props,                                  <A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;authenticator)</PRE><DL><DD>Get a new Session object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>props</CODE> - Properties object that hold relevant properties.<br>                  It is expected that the client supplies values                  for the properties listed in Appendix A of the                  JavaMail spec (particularly  mail.store.protocol,                   mail.transport.protocol, mail.host, mail.user,                   and mail.from) as the defaults are unlikely to                   work in all cases.<DD><CODE>authenticator</CODE> - Authenticator object used to call back to			the application when a user name and password is			needed.<DT><B>Returns:</B><DD>a new Session object<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail"><CODE>Authenticator</CODE></A></DL></DD></DL><HR><A NAME="getInstance(java.util.Properties)"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A> <B>getInstance</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A>&nbsp;props)</PRE><DL><DD>Get a new Session object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>props</CODE> - Properties object that hold relevant properties.<br>                  It is expected that the client supplies values                  for the properties listed in Appendix A of the                  JavaMail spec (particularly  mail.store.protocol,                   mail.transport.protocol, mail.host, mail.user,                   and mail.from) as the defaults are unlikely to                   work in all cases.<DT><B>Returns:</B><DD>a new Session object<DT><B>Since:</B></DT>  <DD>JavaMail 1.2</DD></DL></DD></DL><HR><A NAME="getDefaultInstance(java.util.Properties, javax.mail.Authenticator)"><!-- --></A><H3>getDefaultInstance</H3><PRE>public static <A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A> <B>getDefaultInstance</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A>&nbsp;props,                                         <A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;authenticator)</PRE><DL><DD>Get the default Session object. If a default has not yet been setup, a new Session object is created and installed as the  default. <p> Since the default session is potentially available to all code executing in the same Java virtual machine, and the session can contain security sensitive information such as user names and passwords, access to the default session is restricted. The Authenticator object, which must be created by the caller, is used indirectly to check access permission.  The Authenticator object passed in when the session is created is compared with the Authenticator object passed in to subsequent requests to get the default session.  If both objects are the same, or are

⌨️ 快捷键说明

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