Subversion Repositories javautils

Rev

Blame | Last modification | View Log | RSS feed

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:38 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. Session (JavaMail API documentation)
  9. </TITLE>
  10.  
  11. <META NAME="date" CONTENT="2009-11-17">
  12.  
  13. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
  14.  
  15. <SCRIPT type="text/javascript">
  16. function windowTitle()
  17. {
  18.     if (location.href.indexOf('is-external=true') == -1) {
  19.         parent.document.title="Session (JavaMail API documentation)";
  20.     }
  21. }
  22. </SCRIPT>
  23. <NOSCRIPT>
  24. </NOSCRIPT>
  25.  
  26. </HEAD>
  27.  
  28. <BODY BGCOLOR="white" onload="windowTitle();">
  29. <HR>
  30.  
  31.  
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <A NAME="navbar_top"><!-- --></A>
  34. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  35. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  36. <TR>
  37. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  38. <A NAME="navbar_top_firstrow"><!-- --></A>
  39. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  40.   <TR ALIGN="center" VALIGN="top">
  41.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  42.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  43.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  44.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Session.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  45.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  46.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  47.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  48.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  49.   </TR>
  50. </TABLE>
  51. </TD>
  52. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  53. </EM>
  54. </TD>
  55. </TR>
  56.  
  57. <TR>
  58. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  59. &nbsp;<A HREF="../../javax/mail/Service.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../index.html?javax/mail/Session.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="Session.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  64. &nbsp;<SCRIPT type="text/javascript">
  65.   <!--
  66.   if(window==top) {
  67.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  68.   }
  69.   //-->
  70. </SCRIPT>
  71. <NOSCRIPT>
  72.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  73. </NOSCRIPT>
  74.  
  75.  
  76. </FONT></TD>
  77. </TR>
  78. <TR>
  79. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  80.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  81. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  82. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  83. </TR>
  84. </TABLE>
  85. <A NAME="skip-navbar_top"></A>
  86. <!-- ========= END OF TOP NAVBAR ========= -->
  87.  
  88. <HR>
  89. <!-- ======== START OF CLASS DATA ======== -->
  90. <H2>
  91. <FONT SIZE="-1">
  92. javax.mail</FONT>
  93. <BR>
  94. Class Session</H2>
  95. <PRE>
  96. <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  97.   <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>javax.mail.Session</B>
  98. </PRE>
  99. <HR>
  100. <DL>
  101. <DT><PRE>public final class <B>Session</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
  102. </PRE>
  103.  
  104. <P>
  105. The Session class represents a mail session and is not subclassed.
  106.  It collects together properties and defaults used by the mail API's.
  107. A single default session can be shared by multiple applications on the
  108. desktop.  Unshared sessions can also be created. <p>
  109.  
  110. The Session class provides access to the protocol providers that
  111. implement the <code>Store</code>, <code>Transport</code>, and related
  112. classes.  The protocol providers are configured using the following files:
  113. <ul>
  114.  <li> <code>javamail.providers</code> and
  115.        <code>javamail.default.providers</code> </li>
  116.  <li> <code>javamail.address.map</code> and
  117.        <code>javamail.default.address.map</code> </li>
  118. </ul>
  119. <p>
  120. Each <code>javamail.</code><i>X</i> resource file is searched for using
  121. three methods in the following order:
  122. <ol>
  123.  <li> <code>java.home/lib/javamail.</code><i>X</i> </li>
  124.  <li> <code>META-INF/javamail.</code><i>X</i> </li>
  125.  <li> <code>META-INF/javamail.default.</code><i>X</i> </li>
  126. </ol>
  127. <p>
  128. The first method allows the user to include their own version of the
  129. resource file by placing it in the <code>lib</code> directory where the
  130. <code>java.home</code> property points.  The second method allows an
  131. application that uses the JavaMail APIs to include their own resource
  132. files in their application's or jar file's <code>META-INF</code>
  133. directory.  The <code>javamail.default.</code><i>X</i> default files
  134. are part of the JavaMail <code>mail.jar</code> file. <p>
  135.  
  136. File location depends upon how the <code>ClassLoader</code> method
  137. <code>getResource</code> is implemented.  Usually, the
  138. <code>getResource</code> method searches through CLASSPATH until it
  139. finds the requested file and then stops.  JDK 1.1 has a limitation that
  140. the number of files of each name that will be found in the CLASSPATH is
  141. limited to one.  However, this only affects method two, above; method
  142. one is loaded from a specific location (if allowed by the
  143. SecurityManager) and method three uses a different name to ensure that
  144. the default resource file is always loaded successfully.  J2SE 1.2 and
  145. later are not limited to one file of a given name. <p>
  146.  
  147. The ordering of entries in the resource files matters.  If multiple
  148. entries exist, the first entries take precedence over the later
  149. entries.  For example, the first IMAP provider found will be set as the
  150. default IMAP implementation until explicitly changed by the
  151. application.  The user- or system-supplied resource files augment, they
  152. do not override, the default files included with the JavaMail APIs.
  153. This means that all entries in all files loaded will be available. <p>
  154.  
  155. <b><code>javamail.providers</code></b> and
  156. <b><code>javamail.default.providers</code></b><p>
  157.  
  158. These resource files specify the stores and transports that are
  159. available on the system, allowing an application to "discover" what
  160. store and transport implementations are available.  The protocol
  161. implementations are listed one per line.  The file format defines four
  162. attributes that describe a protocol implementation.  Each attribute is
  163. an "="-separated name-value pair with the name in lowercase. Each
  164. name-value pair is semi-colon (";") separated.  The following names
  165. are defined. <p>
  166.  
  167. <table border=1>
  168. <caption>
  169. Attribute Names in Providers Files
  170. </caption>
  171. <tr>
  172. <th>Name</th><th>Description</th>
  173. </tr>
  174. <tr>
  175. <td>protocol</td>
  176. <td>Name assigned to protocol.
  177. For example, <code>smtp</code> for Transport.</td>
  178. </tr>
  179. <tr>
  180. <td>type</td>
  181. <td>Valid entries are <code>store</code> and <code>transport</code>.</td>
  182. </tr>
  183. <tr>
  184. <td>class</td>
  185. <td>Class name that implements this protocol.</td>
  186. </tr>
  187. <tr>
  188. <td>vendor</td>
  189. <td>Optional string identifying the vendor.</td>
  190. </tr>
  191. <tr>
  192. <td>version</td>
  193. <td>Optional string identifying the version.</td>
  194. </tr>
  195. </table><p>
  196.  
  197. Here's an example of <code>META-INF/javamail.default.providers</code>
  198.  file contents:
  199.  <pre>
  200.  protocol=imap; type=store; class=com.sun.mail.imap.IMAPStore; vendor=Sun Microsystems, Inc.;
  201.  protocol=smtp; type=transport; class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc.;
  202.  </pre><p>
  203.  
  204.  <b><code>javamail.address.map</code></b> and
  205.  <b><code>javamail.default.address.map</code></b><p>
  206.  
  207.  These resource files map transport address types to the transport
  208.  protocol.  The <code>getType</code> method of
  209.  </code>javax.mail.Address</code> returns the address type.  The
  210.  <code>javamail.address.map</code> file maps the transport type to the
  211.  protocol.  The file format is a series of name-value pairs.  Each key
  212.  name should correspond to an address type that is currently installed
  213.  on the system; there should also be an entry for each
  214.  <code>javax.mail.Address</code> implementation that is present if it is
  215.  to be used.  For example, the
  216.  <code>javax.mail.internet.InternetAddress</code> method
  217.  <code>getType</code> returns "rfc822". Each referenced protocol should
  218.  be installed on the system.  For the case of <code>news</code>, below,
  219.  the client should install a Transport provider supporting the nntp
  220.  protocol. <p>
  221.  
  222.  Here are the typical contents of a <code>javamail.address.map</code> file:
  223.  <pre>
  224.  rfc822=smtp
  225.  news=nntp
  226.  </pre>
  227. <P>
  228.  
  229. <P>
  230. <HR>
  231.  
  232. <P>
  233.  
  234. <!-- ========== METHOD SUMMARY =========== -->
  235.  
  236. <A NAME="method_summary"><!-- --></A>
  237. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  238. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  239. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  240. <B>Method Summary</B></FONT></TH>
  241. </TR>
  242. <TR BGCOLOR="white" CLASS="TableRowColor">
  243. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  244. <CODE>&nbsp;void</CODE></FONT></TD>
  245. <TD><CODE><B><A HREF="../../javax/mail/Session.html#addProvider(javax.mail.Provider)">addProvider</A></B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)</CODE>
  246.  
  247. <BR>
  248. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a provider to the session.</TD>
  249. </TR>
  250. <TR BGCOLOR="white" CLASS="TableRowColor">
  251. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  252. <CODE>&nbsp;boolean</CODE></FONT></TD>
  253. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getDebug()">getDebug</A></B>()</CODE>
  254.  
  255. <BR>
  256. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the debug setting for this Session.</TD>
  257. </TR>
  258. <TR BGCOLOR="white" CLASS="TableRowColor">
  259. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  260. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</A></CODE></FONT></TD>
  261. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getDebugOut()">getDebugOut</A></B>()</CODE>
  262.  
  263. <BR>
  264. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the stream to be used for debugging output.</TD>
  265. </TR>
  266. <TR BGCOLOR="white" CLASS="TableRowColor">
  267. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  268. <CODE>static&nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></CODE></FONT></TD>
  269. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getDefaultInstance(java.util.Properties)">getDefaultInstance</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>
  270.  
  271. <BR>
  272. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the default Session object.</TD>
  273. </TR>
  274. <TR BGCOLOR="white" CLASS="TableRowColor">
  275. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  276. <CODE>static&nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></CODE></FONT></TD>
  277. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getDefaultInstance(java.util.Properties, javax.mail.Authenticator)">getDefaultInstance</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props,
  278.                    <A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;authenticator)</CODE>
  279.  
  280. <BR>
  281. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the default Session object.</TD>
  282. </TR>
  283. <TR BGCOLOR="white" CLASS="TableRowColor">
  284. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  285. <CODE>&nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A></CODE></FONT></TD>
  286. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getFolder(javax.mail.URLName)">getFolder</A></B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)</CODE>
  287.  
  288. <BR>
  289. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a closed Folder object for the given URLName.</TD>
  290. </TR>
  291. <TR BGCOLOR="white" CLASS="TableRowColor">
  292. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  293. <CODE>static&nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></CODE></FONT></TD>
  294. <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.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>
  295.  
  296. <BR>
  297. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a new Session object.</TD>
  298. </TR>
  299. <TR BGCOLOR="white" CLASS="TableRowColor">
  300. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  301. <CODE>static&nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></CODE></FONT></TD>
  302. <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.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props,
  303.             <A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;authenticator)</CODE>
  304.  
  305. <BR>
  306. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a new Session object.</TD>
  307. </TR>
  308. <TR BGCOLOR="white" CLASS="TableRowColor">
  309. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  310. <CODE>&nbsp;<A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A></CODE></FONT></TD>
  311. <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>
  312.  
  313. <BR>
  314. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return any saved PasswordAuthentication for this (store or transport)
  315.  URLName.</TD>
  316. </TR>
  317. <TR BGCOLOR="white" CLASS="TableRowColor">
  318. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  319. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A></CODE></FONT></TD>
  320. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getProperties()">getProperties</A></B>()</CODE>
  321.  
  322. <BR>
  323. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Properties object associated with this Session</TD>
  324. </TR>
  325. <TR BGCOLOR="white" CLASS="TableRowColor">
  326. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  327. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  328. <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.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
  329.  
  330. <BR>
  331. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the specified property.</TD>
  332. </TR>
  333. <TR BGCOLOR="white" CLASS="TableRowColor">
  334. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  335. <CODE>&nbsp;<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A></CODE></FONT></TD>
  336. <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.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol)</CODE>
  337.  
  338. <BR>
  339. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the default Provider for the protocol
  340.  specified.</TD>
  341. </TR>
  342. <TR BGCOLOR="white" CLASS="TableRowColor">
  343. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  344. <CODE>&nbsp;<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>[]</CODE></FONT></TD>
  345. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getProviders()">getProviders</A></B>()</CODE>
  346.  
  347. <BR>
  348. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns an array of all the implementations installed
  349.  via the javamail.[default.]providers files that can
  350.  be loaded using the ClassLoader available to this application.</TD>
  351. </TR>
  352. <TR BGCOLOR="white" CLASS="TableRowColor">
  353. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  354. <CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD>
  355. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getStore()">getStore</A></B>()</CODE>
  356.  
  357. <BR>
  358. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Store object that implements this user's desired Store
  359. protocol.</TD>
  360. </TR>
  361. <TR BGCOLOR="white" CLASS="TableRowColor">
  362. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  363. <CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD>
  364. <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>
  365.  
  366. <BR>
  367. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an instance of the store specified by Provider.</TD>
  368. </TR>
  369. <TR BGCOLOR="white" CLASS="TableRowColor">
  370. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  371. <CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD>
  372. <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.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol)</CODE>
  373.  
  374. <BR>
  375. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Store object that implements the specified protocol.</TD>
  376. </TR>
  377. <TR BGCOLOR="white" CLASS="TableRowColor">
  378. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  379. <CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD>
  380. <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>
  381.  
  382. <BR>
  383. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Store object for the given URLName.</TD>
  384. </TR>
  385. <TR BGCOLOR="white" CLASS="TableRowColor">
  386. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  387. <CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD>
  388. <TD><CODE><B><A HREF="../../javax/mail/Session.html#getTransport()">getTransport</A></B>()</CODE>
  389.  
  390. <BR>
  391. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Transport object that implements this user's desired
  392.  Transport protcol.</TD>
  393. </TR>
  394. <TR BGCOLOR="white" CLASS="TableRowColor">
  395. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  396. <CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD>
  397. <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>
  398.  
  399. <BR>
  400. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Transport object that can transport a Message of the
  401.  specified address type.</TD>
  402. </TR>
  403. <TR BGCOLOR="white" CLASS="TableRowColor">
  404. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  405. <CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD>
  406. <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>
  407.  
  408. <BR>
  409. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an instance of the transport specified in the Provider.</TD>
  410. </TR>
  411. <TR BGCOLOR="white" CLASS="TableRowColor">
  412. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  413. <CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD>
  414. <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.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol)</CODE>
  415.  
  416. <BR>
  417. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Transport object that implements the specified protocol.</TD>
  418. </TR>
  419. <TR BGCOLOR="white" CLASS="TableRowColor">
  420. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  421. <CODE>&nbsp;<A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></CODE></FONT></TD>
  422. <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>
  423.  
  424. <BR>
  425. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Transport object for the given URLName.</TD>
  426. </TR>
  427. <TR BGCOLOR="white" CLASS="TableRowColor">
  428. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  429. <CODE>&nbsp;<A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A></CODE></FONT></TD>
  430. <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.2/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A>&nbsp;addr,
  431.                               int&nbsp;port,
  432.                               <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol,
  433.                               <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;prompt,
  434.                               <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;defaultUserName)</CODE>
  435.  
  436. <BR>
  437. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call back to the application to get the needed user name and password.</TD>
  438. </TR>
  439. <TR BGCOLOR="white" CLASS="TableRowColor">
  440. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  441. <CODE>&nbsp;void</CODE></FONT></TD>
  442. <TD><CODE><B><A HREF="../../javax/mail/Session.html#setDebug(boolean)">setDebug</A></B>(boolean&nbsp;debug)</CODE>
  443.  
  444. <BR>
  445. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the debug setting for this Session.</TD>
  446. </TR>
  447. <TR BGCOLOR="white" CLASS="TableRowColor">
  448. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  449. <CODE>&nbsp;void</CODE></FONT></TD>
  450. <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.2/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</A>&nbsp;out)</CODE>
  451.  
  452. <BR>
  453. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the stream to be used for debugging output for this session.</TD>
  454. </TR>
  455. <TR BGCOLOR="white" CLASS="TableRowColor">
  456. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  457. <CODE>&nbsp;void</CODE></FONT></TD>
  458. <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,
  459.                           <A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A>&nbsp;pw)</CODE>
  460.  
  461. <BR>
  462. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save a PasswordAuthentication for this (store or transport) URLName.</TD>
  463. </TR>
  464. <TR BGCOLOR="white" CLASS="TableRowColor">
  465. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  466. <CODE>&nbsp;void</CODE></FONT></TD>
  467. <TD><CODE><B><A HREF="../../javax/mail/Session.html#setProtocolForAddress(java.lang.String, java.lang.String)">setProtocolForAddress</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;addresstype,
  468.                       <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol)</CODE>
  469.  
  470. <BR>
  471. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the default transport protocol to use for addresses of
  472.  the specified type.</TD>
  473. </TR>
  474. <TR BGCOLOR="white" CLASS="TableRowColor">
  475. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  476. <CODE>&nbsp;void</CODE></FONT></TD>
  477. <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>
  478.  
  479. <BR>
  480. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the passed Provider to be the default implementation
  481.  for the protocol in Provider.protocol overriding any previous values.</TD>
  482. </TR>
  483. </TABLE>
  484. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  485. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  486. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  487. <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
  488. </TR>
  489. <TR BGCOLOR="white" CLASS="TableRowColor">
  490. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
  491. </TR>
  492. </TABLE>
  493. &nbsp;
  494. <P>
  495.  
  496. <!-- ============ METHOD DETAIL ========== -->
  497.  
  498. <A NAME="method_detail"><!-- --></A>
  499. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  500. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  501. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  502. <B>Method Detail</B></FONT></TH>
  503. </TR>
  504. </TABLE>
  505.  
  506. <A NAME="getInstance(java.util.Properties, javax.mail.Authenticator)"><!-- --></A><H3>
  507. getInstance</H3>
  508. <PRE>
  509. 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.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props,
  510.                                   <A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;authenticator)</PRE>
  511. <DL>
  512. <DD>Get a new Session object.
  513. <P>
  514. <DD><DL>
  515. <DT><B>Parameters:</B><DD><CODE>props</CODE> - Properties object that hold relevant properties.<br>
  516.                   It is expected that the client supplies values
  517.                   for the properties listed in Appendix A of the
  518.                   JavaMail spec (particularly  mail.store.protocol,
  519.                   mail.transport.protocol, mail.host, mail.user,
  520.                   and mail.from) as the defaults are unlikely to
  521.                   work in all cases.<DD><CODE>authenticator</CODE> - Authenticator object used to call back to
  522.                         the application when a user name and password is
  523.                         needed.
  524. <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>
  525. </DD>
  526. </DL>
  527. <HR>
  528.  
  529. <A NAME="getInstance(java.util.Properties)"><!-- --></A><H3>
  530. getInstance</H3>
  531. <PRE>
  532. 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.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</PRE>
  533. <DL>
  534. <DD>Get a new Session object.
  535. <P>
  536. <DD><DL>
  537. <DT><B>Parameters:</B><DD><CODE>props</CODE> - Properties object that hold relevant properties.<br>
  538.                   It is expected that the client supplies values
  539.                   for the properties listed in Appendix A of the
  540.                   JavaMail spec (particularly  mail.store.protocol,
  541.                   mail.transport.protocol, mail.host, mail.user,
  542.                   and mail.from) as the defaults are unlikely to
  543.                   work in all cases.
  544. <DT><B>Returns:</B><DD>a new Session object<DT><B>Since:</B></DT>
  545.   <DD>JavaMail 1.2</DD>
  546. </DL>
  547. </DD>
  548. </DL>
  549. <HR>
  550.  
  551. <A NAME="getDefaultInstance(java.util.Properties, javax.mail.Authenticator)"><!-- --></A><H3>
  552. getDefaultInstance</H3>
  553. <PRE>
  554. 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.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props,
  555.                                          <A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;authenticator)</PRE>
  556. <DL>
  557. <DD>Get the default Session object. If a default has not yet been
  558.  setup, a new Session object is created and installed as the
  559.  default. <p>
  560.  
  561.  Since the default session is potentially available to all
  562.  code executing in the same Java virtual machine, and the session
  563.  can contain security sensitive information such as user names
  564.  and passwords, access to the default session is restricted.
  565.  The Authenticator object, which must be created by the caller,
  566.  is used indirectly to check access permission.  The Authenticator
  567.  object passed in when the session is created is compared with
  568.  the Authenticator object passed in to subsequent requests to
  569.  get the default session.  If both objects are the same, or are
  570.  from the same ClassLoader, the request is allowed.  Otherwise,
  571.  it is denied.  <p>
  572.  
  573.  Note that if the Authenticator object used to create the session
  574.  is null, anyone can get the default session by passing in null.  <p>
  575.  
  576.  Note also that the Properties object is used only the first time
  577.  this method is called, when a new Session object is created.
  578.  Subsequent calls return the Session object that was created by the
  579.  first call, and ignore the passed Properties object.  Use the
  580.  <code>getInstance</code> method to get a new Session object every
  581.  time the method is called. <p>
  582.  
  583.  In JDK 1.2, additional security Permission objects may be used to
  584.  control access to the default session.
  585. <P>
  586. <DD><DL>
  587. <DT><B>Parameters:</B><DD><CODE>props</CODE> - Properties object. Used only if a new Session
  588.                         object is created.<br>
  589.                   It is expected that the client supplies values
  590.                   for the properties listed in Appendix A of the
  591.                   JavaMail spec (particularly  mail.store.protocol,
  592.                   mail.transport.protocol, mail.host, mail.user,
  593.                   and mail.from) as the defaults are unlikely to
  594.                   work in all cases.<DD><CODE>authenticator</CODE> - Authenticator object.  Used only if a
  595.                         new Session object is created.  Otherwise,
  596.                         it must match the Authenticator used to create
  597.                         the Session.
  598. <DT><B>Returns:</B><DD>the default Session object</DL>
  599. </DD>
  600. </DL>
  601. <HR>
  602.  
  603. <A NAME="getDefaultInstance(java.util.Properties)"><!-- --></A><H3>
  604. getDefaultInstance</H3>
  605. <PRE>
  606. 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.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</PRE>
  607. <DL>
  608. <DD>Get the default Session object. If a default has not yet been
  609.  setup, a new Session object is created and installed as the
  610.  default. <p>
  611.  
  612.  Note that a default session created with no Authenticator is
  613.  available to all code executing in the same Java virtual
  614.  machine, and the session can contain security sensitive
  615.  information such as user names and passwords.
  616. <P>
  617. <DD><DL>
  618. <DT><B>Parameters:</B><DD><CODE>props</CODE> - Properties object. Used only if a new Session
  619.                         object is created.<br>
  620.                   It is expected that the client supplies values
  621.                   for the properties listed in Appendix A of the
  622.                   JavaMail spec (particularly  mail.store.protocol,
  623.                   mail.transport.protocol, mail.host, mail.user,
  624.                   and mail.from) as the defaults are unlikely to
  625.                   work in all cases.
  626. <DT><B>Returns:</B><DD>the default Session object<DT><B>Since:</B></DT>
  627.   <DD>JavaMail 1.2</DD>
  628. </DL>
  629. </DD>
  630. </DL>
  631. <HR>
  632.  
  633. <A NAME="setDebug(boolean)"><!-- --></A><H3>
  634. setDebug</H3>
  635. <PRE>
  636. public void <B>setDebug</B>(boolean&nbsp;debug)</PRE>
  637. <DL>
  638. <DD>Set the debug setting for this Session.
  639.  <p>
  640.  Since the debug setting can be turned on only after the Session
  641.  has been created, to turn on debugging in the Session
  642.  constructor, set the property <code>mail.debug</code> in the
  643.  Properties object passed in to the constructor to true.  The
  644.  value of the <code>mail.debug</code> property is used to
  645.  initialize the per-Session debugging flag.  Subsequent calls to
  646.  the <code>setDebug</code> method manipulate the per-Session
  647.  debugging flag and have no affect on the <code>mail.debug</code>
  648.  property.
  649. <P>
  650. <DD><DL>
  651. <DT><B>Parameters:</B><DD><CODE>debug</CODE> - Debug setting</DL>
  652. </DD>
  653. </DL>
  654. <HR>
  655.  
  656. <A NAME="getDebug()"><!-- --></A><H3>
  657. getDebug</H3>
  658. <PRE>
  659. public boolean <B>getDebug</B>()</PRE>
  660. <DL>
  661. <DD>Get the debug setting for this Session.
  662. <P>
  663. <DD><DL>
  664.  
  665. <DT><B>Returns:</B><DD>current debug setting</DL>
  666. </DD>
  667. </DL>
  668. <HR>
  669.  
  670. <A NAME="setDebugOut(java.io.PrintStream)"><!-- --></A><H3>
  671. setDebugOut</H3>
  672. <PRE>
  673. public void <B>setDebugOut</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</A>&nbsp;out)</PRE>
  674. <DL>
  675. <DD>Set the stream to be used for debugging output for this session.
  676.  If <code>out</code> is null, <code>System.out</code> will be used.
  677.  Note that debugging output that occurs before any session is created,
  678.  as a result of setting the <code>mail.debug</code> system property,
  679.  will always be sent to <code>System.out</code>.
  680. <P>
  681. <DD><DL>
  682. <DT><B>Parameters:</B><DD><CODE>out</CODE> - the PrintStream to use for debugging output<DT><B>Since:</B></DT>
  683.   <DD>JavaMail 1.3</DD>
  684. </DL>
  685. </DD>
  686. </DL>
  687. <HR>
  688.  
  689. <A NAME="getDebugOut()"><!-- --></A><H3>
  690. getDebugOut</H3>
  691. <PRE>
  692. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</A> <B>getDebugOut</B>()</PRE>
  693. <DL>
  694. <DD>Returns the stream to be used for debugging output.  If no stream
  695.  has been set, <code>System.out</code> is returned.
  696. <P>
  697. <DD><DL>
  698.  
  699. <DT><B>Returns:</B><DD>the PrintStream to use for debugging output<DT><B>Since:</B></DT>
  700.   <DD>JavaMail 1.3</DD>
  701. </DL>
  702. </DD>
  703. </DL>
  704. <HR>
  705.  
  706. <A NAME="getProviders()"><!-- --></A><H3>
  707. getProviders</H3>
  708. <PRE>
  709. public <A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>[] <B>getProviders</B>()</PRE>
  710. <DL>
  711. <DD>This method returns an array of all the implementations installed
  712.  via the javamail.[default.]providers files that can
  713.  be loaded using the ClassLoader available to this application.
  714. <P>
  715. <DD><DL>
  716.  
  717. <DT><B>Returns:</B><DD>Array of configured providers</DL>
  718. </DD>
  719. </DL>
  720. <HR>
  721.  
  722. <A NAME="getProvider(java.lang.String)"><!-- --></A><H3>
  723. getProvider</H3>
  724. <PRE>
  725. 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.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol)
  726.                      throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  727. <DL>
  728. <DD>Returns the default Provider for the protocol
  729.  specified. Checks mail.&lt;protocol&gt;.class property
  730.  first and if it exists, returns the Provider
  731.  associated with this implementation. If it doesn't exist,
  732. returns the Provider that appeared first in the
  733. configuration files. If an implementation for the protocol
  734. isn't found, throws NoSuchProviderException
  735. <P>
  736. <DD><DL>
  737. <DT><B>Parameters:</B><DD><CODE>protocol</CODE> - Configured protocol (i.e. smtp, imap, etc)
  738. <DT><B>Returns:</B><DD>Currently configured Provider for the specified protocol
  739. <DT><B>Throws:</B>
  740. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given
  741.                         protocol is not found.</DL>
  742. </DD>
  743. </DL>
  744. <HR>
  745.  
  746. <A NAME="setProvider(javax.mail.Provider)"><!-- --></A><H3>
  747. setProvider</H3>
  748. <PRE>
  749. public void <B>setProvider</B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)
  750.                  throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  751. <DL>
  752. <DD>Set the passed Provider to be the default implementation
  753.  for the protocol in Provider.protocol overriding any previous values.
  754. <P>
  755. <DD><DL>
  756. <DT><B>Parameters:</B><DD><CODE>provider</CODE> - Currently configured Provider which will be
  757.  set as the default for the protocol
  758. <DT><B>Throws:</B>
  759. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If the provider passed in
  760.                         is invalid.</DL>
  761. </DD>
  762. </DL>
  763. <HR>
  764.  
  765. <A NAME="getStore()"><!-- --></A><H3>
  766. getStore</H3>
  767. <PRE>
  768. public <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> <B>getStore</B>()
  769.                throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  770. <DL>
  771. <DD>Get a Store object that implements this user's desired Store
  772. protocol. The <code>mail.store.protocol</code> property specifies the
  773. desired protocol. If an appropriate Store object is not obtained,
  774. NoSuchProviderException is thrown
  775. <P>
  776. <DD><DL>
  777.  
  778. <DT><B>Returns:</B><DD>a Store object
  779. <DT><B>Throws:</B>
  780. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given
  781.                        protocol is not found.</DL>
  782. </DD>
  783. </DL>
  784. <HR>
  785.  
  786. <A NAME="getStore(java.lang.String)"><!-- --></A><H3>
  787. getStore</H3>
  788. <PRE>
  789. 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.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol)
  790.               throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  791. <DL>
  792. <DD>Get a Store object that implements the specified protocol. If an
  793. appropriate Store object cannot be obtained,
  794. NoSuchProviderException is thrown.
  795. <P>
  796. <DD><DL>
  797. <DT><B>Parameters:</B><DD><CODE>protocol</CODE> -
  798. <DT><B>Returns:</B><DD>a Store object
  799. <DT><B>Throws:</B>
  800. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given
  801.                        protocol is not found.</DL>
  802. </DD>
  803. </DL>
  804. <HR>
  805.  
  806. <A NAME="getStore(javax.mail.URLName)"><!-- --></A><H3>
  807. getStore</H3>
  808. <PRE>
  809. 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)
  810.               throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  811. <DL>
  812. <DD>Get a Store object for the given URLName. If the requested Store
  813. object cannot be obtained, NoSuchProviderException is thrown.
  814.  
  815. The "scheme" part of the URL string (Refer RFC 1738) is used
  816. to locate the Store protocol. <p>
  817. <P>
  818. <DD><DL>
  819. <DT><B>Parameters:</B><DD><CODE>url</CODE> - URLName that represents the desired Store
  820. <DT><B>Returns:</B><DD>a closed Store object
  821. <DT><B>Throws:</B>
  822. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given
  823.                        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>,
  824. <A HREF="../../javax/mail/URLName.html" title="class in javax.mail"><CODE>URLName</CODE></A></DL>
  825. </DD>
  826. </DL>
  827. <HR>
  828.  
  829. <A NAME="getStore(javax.mail.Provider)"><!-- --></A><H3>
  830. getStore</H3>
  831. <PRE>
  832. 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)
  833.               throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  834. <DL>
  835. <DD>Get an instance of the store specified by Provider. Instantiates
  836. the store and returns it.
  837. <P>
  838. <DD><DL>
  839. <DT><B>Parameters:</B><DD><CODE>provider</CODE> - Store Provider that will be instantiated
  840. <DT><B>Returns:</B><DD>Instantiated Store
  841. <DT><B>Throws:</B>
  842. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given
  843.                        Provider is not found.</DL>
  844. </DD>
  845. </DL>
  846. <HR>
  847.  
  848. <A NAME="getFolder(javax.mail.URLName)"><!-- --></A><H3>
  849. getFolder</H3>
  850. <PRE>
  851. 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)
  852.                 throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  853. <DL>
  854. <DD>Get a closed Folder object for the given URLName. If the requested
  855. Folder object cannot be obtained, null is returned. <p>
  856.  
  857. The "scheme" part of the URL string (Refer RFC 1738) is used
  858. to locate the Store protocol. The rest of the URL string (that is,
  859. the "schemepart", as per RFC 1738) is used by that Store
  860. in a protocol dependent manner to locate and instantiate the
  861. appropriate Folder object. <p>
  862.  
  863. Note that RFC 1738 also specifies the syntax for the
  864. "schemepart" for IP-based protocols (IMAP4, POP3, etc.).
  865. Providers of IP-based mail Stores should implement that
  866. syntax for referring to Folders. <p>
  867. <P>
  868. <DD><DL>
  869. <DT><B>Parameters:</B><DD><CODE>url</CODE> - URLName that represents the desired folder
  870. <DT><B>Returns:</B><DD>Folder
  871. <DT><B>Throws:</B>
  872. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given
  873.                        URLName is not found.
  874. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if the Folder could not be
  875.                        located or created.<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Session.html#getStore(javax.mail.URLName)"><CODE>getStore(URLName)</CODE></A>,
  876. <A HREF="../../javax/mail/URLName.html" title="class in javax.mail"><CODE>URLName</CODE></A></DL>
  877. </DD>
  878. </DL>
  879. <HR>
  880.  
  881. <A NAME="getTransport()"><!-- --></A><H3>
  882. getTransport</H3>
  883. <PRE>
  884. public <A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A> <B>getTransport</B>()
  885.                       throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  886. <DL>
  887. <DD>Get a Transport object that implements this user's desired
  888.  Transport protcol. The <code>mail.transport.protocol</code> property
  889.  specifies the desired protocol. If an appropriate Transport
  890.  object cannot be obtained, MessagingException is thrown.
  891. <P>
  892. <DD><DL>
  893.  
  894. <DT><B>Returns:</B><DD>a Transport object
  895. <DT><B>Throws:</B>
  896. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If the provider is not found.</DL>
  897. </DD>
  898. </DL>
  899. <HR>
  900.  
  901. <A NAME="getTransport(java.lang.String)"><!-- --></A><H3>
  902. getTransport</H3>
  903. <PRE>
  904. public <A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A> <B>getTransport</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol)
  905.                        throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  906. <DL>
  907. <DD>Get a Transport object that implements the specified protocol.
  908.  If an appropriate Transport object cannot be obtained, null is
  909.  returned.
  910. <P>
  911. <DD><DL>
  912.  
  913. <DT><B>Returns:</B><DD>a Transport object
  914. <DT><B>Throws:</B>
  915. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If provider for the given
  916.                         protocol is not found.</DL>
  917. </DD>
  918. </DL>
  919. <HR>
  920.  
  921. <A NAME="getTransport(javax.mail.URLName)"><!-- --></A><H3>
  922. getTransport</H3>
  923. <PRE>
  924. public <A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A> <B>getTransport</B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)
  925.                        throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  926. <DL>
  927. <DD>Get a Transport object for the given URLName. If the requested
  928.  Transport object cannot be obtained, NoSuchProviderException is thrown.
  929.  
  930.  The "scheme" part of the URL string (Refer RFC 1738) is used
  931.  to locate the Transport protocol. <p>
  932. <P>
  933. <DD><DL>
  934. <DT><B>Parameters:</B><DD><CODE>url</CODE> - URLName that represents the desired Transport
  935. <DT><B>Returns:</B><DD>a closed Transport object
  936. <DT><B>Throws:</B>
  937. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If a provider for the given
  938.                         URLName is not found.<DT><B>See Also:</B><DD><A HREF="../../javax/mail/URLName.html" title="class in javax.mail"><CODE>URLName</CODE></A></DL>
  939. </DD>
  940. </DL>
  941. <HR>
  942.  
  943. <A NAME="getTransport(javax.mail.Provider)"><!-- --></A><H3>
  944. getTransport</H3>
  945. <PRE>
  946. public <A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A> <B>getTransport</B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)
  947.                        throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  948. <DL>
  949. <DD>Get an instance of the transport specified in the Provider. Instantiates
  950.  the transport and returns it.
  951. <P>
  952. <DD><DL>
  953. <DT><B>Parameters:</B><DD><CODE>provider</CODE> - Transport Provider that will be instantiated
  954. <DT><B>Returns:</B><DD>Instantiated Transport
  955. <DT><B>Throws:</B>
  956. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If provider for the given
  957.                         provider is not found.</DL>
  958. </DD>
  959. </DL>
  960. <HR>
  961.  
  962. <A NAME="getTransport(javax.mail.Address)"><!-- --></A><H3>
  963. getTransport</H3>
  964. <PRE>
  965. public <A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A> <B>getTransport</B>(<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)
  966.                        throws <A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></PRE>
  967. <DL>
  968. <DD>Get a Transport object that can transport a Message of the
  969.  specified address type.
  970. <P>
  971. <DD><DL>
  972. <DT><B>Parameters:</B><DD><CODE>address</CODE> -
  973. <DT><B>Returns:</B><DD>A Transport object
  974. <DT><B>Throws:</B>
  975. <DD><CODE><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></CODE> - If provider for the
  976.                         Address type is not found<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Address.html" title="class in javax.mail"><CODE>Address</CODE></A></DL>
  977. </DD>
  978. </DL>
  979. <HR>
  980.  
  981. <A NAME="setPasswordAuthentication(javax.mail.URLName, javax.mail.PasswordAuthentication)"><!-- --></A><H3>
  982. setPasswordAuthentication</H3>
  983. <PRE>
  984. public void <B>setPasswordAuthentication</B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url,
  985.                                       <A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A>&nbsp;pw)</PRE>
  986. <DL>
  987. <DD>Save a PasswordAuthentication for this (store or transport) URLName.
  988.  If pw is null the entry corresponding to the URLName is removed.
  989.  <p>
  990.  This is normally used only by the store or transport implementations
  991.  to allow authentication information to be shared among multiple
  992.  uses of a session.
  993. <P>
  994. <DD><DL>
  995. </DL>
  996. </DD>
  997. </DL>
  998. <HR>
  999.  
  1000. <A NAME="getPasswordAuthentication(javax.mail.URLName)"><!-- --></A><H3>
  1001. getPasswordAuthentication</H3>
  1002. <PRE>
  1003. public <A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A> <B>getPasswordAuthentication</B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)</PRE>
  1004. <DL>
  1005. <DD>Return any saved PasswordAuthentication for this (store or transport)
  1006.  URLName.  Normally used only by store or transport implementations.
  1007. <P>
  1008. <DD><DL>
  1009.  
  1010. <DT><B>Returns:</B><DD>the PasswordAuthentication corresponding to the URLName</DL>
  1011. </DD>
  1012. </DL>
  1013. <HR>
  1014.  
  1015. <A NAME="requestPasswordAuthentication(java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
  1016. requestPasswordAuthentication</H3>
  1017. <PRE>
  1018. public <A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A> <B>requestPasswordAuthentication</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A>&nbsp;addr,
  1019.                                                             int&nbsp;port,
  1020.                                                             <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol,
  1021.                                                             <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;prompt,
  1022.                                                             <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;defaultUserName)</PRE>
  1023. <DL>
  1024. <DD>Call back to the application to get the needed user name and password.
  1025.  The application should put up a dialog something like:
  1026.  <p> <pre>
  1027.  Connecting to &lt;protocol&gt; mail service on host &lt;addr&gt;, port &lt;port&gt;.
  1028.  &lt;prompt&gt;
  1029.  
  1030.  User Name: &lt;defaultUserName&gt;
  1031.  Password:
  1032.  </pre>
  1033. <P>
  1034. <DD><DL>
  1035. <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
  1036.                           the prompt; may be null.<DD><CODE>defaultUserName</CODE> - the default username. may be null.
  1037. <DT><B>Returns:</B><DD>the authentication which was collected by the authenticator;
  1038.           may be null.</DL>
  1039. </DD>
  1040. </DL>
  1041. <HR>
  1042.  
  1043. <A NAME="getProperties()"><!-- --></A><H3>
  1044. getProperties</H3>
  1045. <PRE>
  1046. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A> <B>getProperties</B>()</PRE>
  1047. <DL>
  1048. <DD>Returns the Properties object associated with this Session
  1049. <P>
  1050. <DD><DL>
  1051.  
  1052. <DT><B>Returns:</B><DD>Properties object</DL>
  1053. </DD>
  1054. </DL>
  1055. <HR>
  1056.  
  1057. <A NAME="getProperty(java.lang.String)"><!-- --></A><H3>
  1058. getProperty</H3>
  1059. <PRE>
  1060. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getProperty</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
  1061. <DL>
  1062. <DD>Returns the value of the specified property. Returns null
  1063.  if this property does not exist.
  1064. <P>
  1065. <DD><DL>
  1066.  
  1067. <DT><B>Returns:</B><DD>String that is the property value</DL>
  1068. </DD>
  1069. </DL>
  1070. <HR>
  1071.  
  1072. <A NAME="addProvider(javax.mail.Provider)"><!-- --></A><H3>
  1073. addProvider</H3>
  1074. <PRE>
  1075. public void <B>addProvider</B>(<A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A>&nbsp;provider)</PRE>
  1076. <DL>
  1077. <DD>Add a provider to the session.
  1078. <P>
  1079. <DD><DL>
  1080. <DT><B>Parameters:</B><DD><CODE>provider</CODE> - the provider to add<DT><B>Since:</B></DT>
  1081.   <DD>JavaMail 1.4</DD>
  1082. </DL>
  1083. </DD>
  1084. </DL>
  1085. <HR>
  1086.  
  1087. <A NAME="setProtocolForAddress(java.lang.String, java.lang.String)"><!-- --></A><H3>
  1088. setProtocolForAddress</H3>
  1089. <PRE>
  1090. public void <B>setProtocolForAddress</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;addresstype,
  1091.                                   <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;protocol)</PRE>
  1092. <DL>
  1093. <DD>Set the default transport protocol to use for addresses of
  1094.  the specified type.  Normally the default is set by the
  1095.  <code>javamail.default.address.map</code> or
  1096.  <code>javamail.address.map</code> files or resources.
  1097. <P>
  1098. <DD><DL>
  1099. <DT><B>Parameters:</B><DD><CODE>addresstype</CODE> - type of address<DD><CODE>protocol</CODE> - name of protocol<DT><B>Since:</B></DT>
  1100.   <DD>JavaMail 1.4</DD>
  1101. <DT><B>See Also:</B><DD><A HREF="../../javax/mail/Session.html#getTransport(javax.mail.Address)"><CODE>getTransport(Address)</CODE></A></DL>
  1102. </DD>
  1103. </DL>
  1104. <!-- ========= END OF CLASS DATA ========= -->
  1105. <HR>
  1106.  
  1107.  
  1108. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  1109. <A NAME="navbar_bottom"><!-- --></A>
  1110. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  1111. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  1112. <TR>
  1113. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  1114. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  1115. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  1116.   <TR ALIGN="center" VALIGN="top">
  1117.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  1118.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  1119.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  1120.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Session.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  1121.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  1122.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  1123.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  1124.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  1125.   </TR>
  1126. </TABLE>
  1127. </TD>
  1128. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  1129. </EM>
  1130. </TD>
  1131. </TR>
  1132.  
  1133. <TR>
  1134. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  1135. &nbsp;<A HREF="../../javax/mail/Service.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  1136. &nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  1137. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  1138.   <A HREF="../../index.html?javax/mail/Session.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  1139. &nbsp;<A HREF="Session.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  1140. &nbsp;<SCRIPT type="text/javascript">
  1141.   <!--
  1142.   if(window==top) {
  1143.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  1144.   }
  1145.   //-->
  1146. </SCRIPT>
  1147. <NOSCRIPT>
  1148.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  1149. </NOSCRIPT>
  1150.  
  1151.  
  1152. </FONT></TD>
  1153. </TR>
  1154. <TR>
  1155. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  1156.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  1157. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  1158. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  1159. </TR>
  1160. </TABLE>
  1161. <A NAME="skip-navbar_bottom"></A>
  1162. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  1163.  
  1164. <HR>
  1165. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  1166. </BODY>
  1167. </HTML>
  1168.