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

📄 session.html

📁 SUN的JAVA MAIL API
💻 HTML
📖 第 1 页 / 共 3 页
字号:
public <A HREF="../../javax/mail/Store.html">Store</A> <B>getStore</B>(<A HREF="../../javax/mail/URLName.html">URLName</A>&nbsp;url)
               throws <A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A></PRE>
<DL>
<DD>Get a Store object for the given URLName. If the requested Store
 object cannot be obtained, NoSuchProviderException is thrown.

 The "scheme" part of the URL string (Refer RFC 1738) is used 
 to locate the Store protocol. <p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>url</CODE> - URLName that represents the desired Store<DT><B>Returns:</B><DD>a closed Store object<DT><B>Throws:</B><DD><A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A> - If a provider for the given
			URLName is not found.<DT><B>See Also: </B><DD><A HREF="../../javax/mail/Session.html#getFolder(javax.mail.URLName)"><CODE>getFolder(URLName)</CODE></A>, 
<A HREF="../../javax/mail/URLName.html"><CODE>URLName</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getStore(javax.mail.Provider)"><!-- --></A><H3>
getStore</H3>
<PRE>
public <A HREF="../../javax/mail/Store.html">Store</A> <B>getStore</B>(<A HREF="../../javax/mail/Provider.html">Provider</A>&nbsp;provider)
               throws <A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A></PRE>
<DL>
<DD>Get an instance of the store specified by Provider. Instantiates
 the store and returns it.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>provider</CODE> - Store Provider that will be instantiated<DT><B>Returns:</B><DD>Instantiated Store<DT><B>Throws:</B><DD><A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A> - If a provider for the given
			Provider is not found.</DL>
</DD>
</DL>
<HR>

<A NAME="getFolder(javax.mail.URLName)"><!-- --></A><H3>
getFolder</H3>
<PRE>
public <A HREF="../../javax/mail/Folder.html">Folder</A> <B>getFolder</B>(<A HREF="../../javax/mail/URLName.html">URLName</A>&nbsp;url)
                 throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get a closed Folder object for the given URLName. If the requested
 Folder object cannot be obtained, null is returned. <p>

 The "scheme" part of the URL string (Refer RFC 1738) is used
 to locate the Store protocol. The rest of the URL string (ie
 the "schemepart", as per RFC 1738) is used by that Store
 in a protocol dependent manner to locate and instantiate the
 appropriate Folder object. <p>

 Note that RFC 1738 also specifies the syntax for the 
 "schemepart" for IP-based protocols (IMAP4, POP3 etc). So
 providers of IP-based mail Stores should implement that
 syntax for referring to Folders. <p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>url</CODE> - URLName that represents the desired folder<DT><B>Returns:</B><DD>Folder<DT><B>Throws:</B><DD><A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A> - If a provider for the given
			URLName is not found.<DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - if the Folder could not be 
			located or created.<DT><B>See Also: </B><DD><A HREF="../../javax/mail/Session.html#getStore(javax.mail.URLName)"><CODE>getStore(URLName)</CODE></A>, 
<A HREF="../../javax/mail/URLName.html"><CODE>URLName</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getTransport()"><!-- --></A><H3>
getTransport</H3>
<PRE>
public <A HREF="../../javax/mail/Transport.html">Transport</A> <B>getTransport</B>()
                       throws <A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A></PRE>
<DL>
<DD>Get a Transport object that implements this user's desired 
 Transport protcol. The <i>mail.transport.protocol</i> property 
 specifies the desired protocol. If an appropriate Transport 
 object cannot be obtained, MessagingException is thrown.<DD><DL>
<DT><B>Returns:</B><DD>a Transport object<DT><B>Throws:</B><DD><A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A> - If the provider is not found.</DL>
</DD>
</DL>
<HR>

<A NAME="getTransport(java.lang.String)"><!-- --></A><H3>
getTransport</H3>
<PRE>
public <A HREF="../../javax/mail/Transport.html">Transport</A> <B>getTransport</B>(java.lang.String&nbsp;protocol)
                       throws <A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A></PRE>
<DL>
<DD>Get a Transport object that implements the specified protocol.
 If an appropriate Transport object cannot be obtained, null is
 returned.<DD><DL>
<DT><B>Returns:</B><DD>a Transport object<DT><B>Throws:</B><DD><A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A> - If provider for the given
			protocol is not found.</DL>
</DD>
</DL>
<HR>

<A NAME="getTransport(javax.mail.URLName)"><!-- --></A><H3>
getTransport</H3>
<PRE>
public <A HREF="../../javax/mail/Transport.html">Transport</A> <B>getTransport</B>(<A HREF="../../javax/mail/URLName.html">URLName</A>&nbsp;url)
                       throws <A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A></PRE>
<DL>
<DD>Get a Transport object for the given URLName. If the requested 
 Transport object cannot be obtained, NoSuchProviderException is thrown.

 The "scheme" part of the URL string (Refer RFC 1738) is used 
 to locate the Transport protocol. <p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>url</CODE> - URLName that represents the desired Transport<DT><B>Returns:</B><DD>a closed Transport object<DT><B>Throws:</B><DD><A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A> - If a provider for the given
			URLName is not found.<DT><B>See Also: </B><DD><A HREF="../../javax/mail/URLName.html"><CODE>URLName</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getTransport(javax.mail.Provider)"><!-- --></A><H3>
getTransport</H3>
<PRE>
public <A HREF="../../javax/mail/Transport.html">Transport</A> <B>getTransport</B>(<A HREF="../../javax/mail/Provider.html">Provider</A>&nbsp;provider)
                       throws <A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A></PRE>
<DL>
<DD>Get an instance of the transport specified in the Provider. Instantiates
 the transport and returns it.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>provider</CODE> - Transport Provider that will be instantiated<DT><B>Returns:</B><DD>Instantiated Transport<DT><B>Throws:</B><DD><A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A> - If provider for the given
			provider is not found.</DL>
</DD>
</DL>
<HR>

<A NAME="getTransport(javax.mail.Address)"><!-- --></A><H3>
getTransport</H3>
<PRE>
public <A HREF="../../javax/mail/Transport.html">Transport</A> <B>getTransport</B>(<A HREF="../../javax/mail/Address.html">Address</A>&nbsp;address)
                       throws <A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A></PRE>
<DL>
<DD>Get a Transport object that can transport a Message to the
 specified address type.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>address</CODE> - &nbsp;<DT><B>Returns:</B><DD>A Transport object<DT><B>Throws:</B><DD><A HREF="../../javax/mail/NoSuchProviderException.html">NoSuchProviderException</A> - If provider for the 
			Address type is not found<DT><B>See Also: </B><DD><A HREF="../../javax/mail/Address.html"><CODE>Address</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setPasswordAuthentication(javax.mail.URLName, javax.mail.PasswordAuthentication)"><!-- --></A><H3>
setPasswordAuthentication</H3>
<PRE>
public void <B>setPasswordAuthentication</B>(<A HREF="../../javax/mail/URLName.html">URLName</A>&nbsp;url,
                                      <A HREF="../../javax/mail/PasswordAuthentication.html">PasswordAuthentication</A>&nbsp;pw)</PRE>
<DL>
<DD>Save a PasswordAuthentication for this (store or transport) URLName.
 If pw is null the entry corresponding to the URLName is removed.
 <p>
 This is normally used only by the store or transport implementations
 to allow authentication information to be shared among multiple
 uses of a session.</DL>
<HR>

<A NAME="getPasswordAuthentication(javax.mail.URLName)"><!-- --></A><H3>
getPasswordAuthentication</H3>
<PRE>
public <A HREF="../../javax/mail/PasswordAuthentication.html">PasswordAuthentication</A> <B>getPasswordAuthentication</B>(<A HREF="../../javax/mail/URLName.html">URLName</A>&nbsp;url)</PRE>
<DL>
<DD>Return any saved PasswordAuthentication for this (store or transport)
 URLName.  Normally used only by store or transport implementations.<DD><DL>
<DT><B>Returns:</B><DD>the PasswordAuthentication corresponding to the URLName</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 <A HREF="../../javax/mail/PasswordAuthentication.html">PasswordAuthentication</A> <B>requestPasswordAuthentication</B>(java.net.InetAddress&nbsp;addr,
                                                            int&nbsp;port,
                                                            java.lang.String&nbsp;protocol,
                                                            java.lang.String&nbsp;prompt,
                                                            java.lang.String&nbsp;defaultUserName)</PRE>
<DL>
<DD>Call back to the application to get the needed user name and password.
 The application should put up a dialog something like:
 <p> <pre>
 Connecting to &lt;protocol&gt; mail service on host &lt;addr&gt;, port &lt;port&gt;.
 &lt;prompt&gt;

 User Name: &lt;defaultUserName&gt;
 Password:
 </pre><DD><DL>
<DT><B>Parameters:</B><DD><CODE>addr</CODE> - InetAddress of the host.  may be null.<DD><CODE>protocol</CODE> - protocol scheme (e.g. imap, pop3, etc.)<DD><CODE>prompt</CODE> - any additional String to show as part of
                          the prompt; may be null.<DD><CODE>defaultUserName</CODE> - the default username. may be null.<DT><B>Returns:</B><DD>the authentication which was collected by the authenticator; 
          may be null.</DL>
</DD>
</DL>
<HR>

<A NAME="getProperties()"><!-- --></A><H3>
getProperties</H3>
<PRE>
public java.util.Properties <B>getProperties</B>()</PRE>
<DL>
<DD>Returns the Properties object associated with this Session<DD><DL>
<DT><B>Returns:</B><DD>Properties object</DL>
</DD>
</DL>
<HR>

<A NAME="getProperty(java.lang.String)"><!-- --></A><H3>
getProperty</H3>
<PRE>
public java.lang.String <B>getProperty</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns the value of the specified property. Returns null
 if this property does not exist.<DD><DL>
<DT><B>Returns:</B><DD>String that is the property value</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" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/Session.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="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" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/mail/Service.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/mail/Store.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Session.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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