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

📄 session.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 4 页
字号:
 from the same ClassLoader, the request is allowed.  Otherwise, it is denied.  <p> Note that if the Authenticator object used to create the session is null, anyone can get the default session by passing in null.  <p> Note also that the Properties object is used only the first time this method is called, when a new Session object is created. Subsequent calls return the Session object that was created by the first call, and ignore the passed Properties object.  Use the <code>getInstance</code> method to get a new Session object every time the method is called. <p> In JDK 1.2, additional security Permission objects may be used to control access to the default session.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>props</CODE> - Properties object. Used only if a new Session			object is created.<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 only if a			new Session object is created.  Otherwise, 			it must match the Authenticator used to create			the Session.<DT><B>Returns:</B><DD>the default Session object</DL></DD></DL><HR><A NAME="getDefaultInstance(java.util.Properties)"><!-- --></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)</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> Note that a default session created with no Authenticator is 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.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>props</CODE> - Properties object. Used only if a new Session			object is created.<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>the default Session object<DT><B>Since:</B></DT>  <DD>JavaMail 1.2</DD></DL></DD></DL><HR><A NAME="setDebug(boolean)"><!-- --></A><H3>setDebug</H3><PRE>public void <B>setDebug</B>(boolean&nbsp;debug)</PRE><DL><DD>Set the debug setting for this Session. <p> Since the debug setting can be turned on only after the Session has been created, to turn on debugging in the Session constructor, set the property <code>mail.debug</code> in the Properties object passed in to the constructor to true.  The value of the <code>mail.debug</code> property is used to initialize the per-Session debugging flag.  Subsequent calls to the <code>setDebug</code> method manipulate the per-Session debugging flag and have no affect on the <code>mail.debug</code> property.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>debug</CODE> - Debug setting</DL></DD></DL><HR><A NAME="getDebug()"><!-- --></A><H3>getDebug</H3><PRE>public boolean <B>getDebug</B>()</PRE><DL><DD>Get the debug setting for this Session.<P><DD><DL><DT><B>Returns:</B><DD>current debug setting</DL></DD></DL><HR><A NAME="setDebugOut(java.io.PrintStream)"><!-- --></A><H3>setDebugOut</H3><PRE>public void <B>setDebugOut</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)</PRE><DL><DD>Set the stream to be used for debugging output for this session. If <code>out</code> is null, <code>System.out</code> will be used. Note that debugging output that occurs before any session is created, as a result of setting the <code>mail.debug</code> system property, will always be sent to <code>System.out</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the PrintStream to use for debugging output<DT><B>Since:</B></DT>  <DD>JavaMail 1.3</DD></DL></DD></DL><HR><A NAME="getDebugOut()"><!-- --></A><H3>getDebugOut</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/PrintStream.html" title="class or interface in java.io">PrintStream</A> <B>getDebugOut</B>()</PRE><DL><DD>Returns the stream to be used for debugging output.  If no stream has been set, <code>System.out</code> is returned.<P><DD><DL><DT><B>Returns:</B><DD>the PrintStream to use for debugging output<DT><B>Since:</B></DT>  <DD>JavaMail 1.3</DD></DL></DD></DL><HR><A NAME="getProviders()"><!-- --></A><H3>getProviders</H3><PRE>public <A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>[] <B>getProviders</B>()</PRE><DL><DD>This method returns an array of all the implementations installed  via the javamail.[default.]providers files that can be loaded using the ClassLoader available to this application.<P><DD><DL><DT><B>Returns:</B><DD>Array of configured providers</DL></DD></DL><HR><A NAME="getProvider(java.lang.String)"><!-- --></A><H3>getProvider</H3><PRE>public <A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A> <B>getProvider</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)                     throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE><DL><DD>Returns the default Provider for the protocol specified. Checks mail.&lt;protocol&gt;.class property first and if it exists, returns the Provider associated with this implementation. If it doesn't exist,  returns the Provider that appeared first in the  configuration files. If an implementation for the protocol  isn't found, throws NoSuchProviderException<P><DD><DL><DT><B>Parameters:</B><DD><CODE>protocol</CODE> - Configured protocol (i.e. smtp, imap, etc)<DT><B>Returns:</B><DD>Currently configured Provider for the specified protocol<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given			protocol is not found.</DL></DD></DL><HR><A NAME="setProvider(javax.mail.Provider)"><!-- --></A><H3>setProvider</H3><PRE>public void <B>setProvider</B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)                 throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE><DL><DD>Set the passed Provider to be the default implementation for the protocol in Provider.protocol overriding any previous values.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>provider</CODE> - Currently configured Provider which will be  set as the default for the protocol<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If the provider passed in			is invalid.</DL></DD></DL><HR><A NAME="getStore()"><!-- --></A><H3>getStore</H3><PRE>public <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> <B>getStore</B>()               throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE><DL><DD>Get a Store object that implements this user's desired Store protocol. The <code>mail.store.protocol</code> property specifies the desired protocol. If an appropriate Store object is not obtained,  NoSuchProviderException is thrown<P><DD><DL><DT><B>Returns:</B><DD>a Store object<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given			protocol is not found.</DL></DD></DL><HR><A NAME="getStore(java.lang.String)"><!-- --></A><H3>getStore</H3><PRE>public <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> <B>getStore</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)               throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE><DL><DD>Get a Store object that implements the specified protocol. If an appropriate Store object cannot be obtained,  NoSuchProviderException is thrown.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>protocol</CODE> - <DT><B>Returns:</B><DD>a Store object<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given			protocol is not found.</DL></DD></DL><HR><A NAME="getStore(javax.mail.URLName)"><!-- --></A><H3>getStore</H3><PRE>public <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> <B>getStore</B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)               throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">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><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><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - 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" title="class in javax.mail"><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" title="class in javax.mail">Store</A> <B>getStore</B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)               throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE><DL><DD>Get an instance of the store specified by Provider. Instantiates the store and returns it.<P><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><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - 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" title="class in javax.mail">Folder</A> <B>getFolder</B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)                 throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>

⌨️ 快捷键说明

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