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. MessageContext (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="MessageContext (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/MessageContext.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/MessageAware.html" title="interface in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;<A HREF="../../javax/mail/MessageRemovedException.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/MessageContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="MessageContext.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;<A HREF="#constructor_summary">CONSTR</A>&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;<A HREF="#constructor_detail">CONSTR</A>&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 MessageContext</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.MessageContext</B>
  98. </PRE>
  99. <HR>
  100. <DL>
  101. <DT><PRE>public class <B>MessageContext</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 context in which a piece of Message content is contained.  A
  106.  <code>MessageContext</code> object is returned by the
  107.  <code>getMessageContext</code> method of the
  108.  <code>MessageAware</code> interface.  <code>MessageAware</code> is
  109.  typically implemented by <code>DataSources</code> to allow a
  110.  <code>DataContentHandler</code> to pass on information about the
  111.  context in which a data content object is operating.
  112. <P>
  113.  
  114. <P>
  115. <DL>
  116. <DT><B>Since:</B></DT>
  117.   <DD>JavaMail 1.1</DD>
  118. <DT><B>See Also:</B><DD><A HREF="../../javax/mail/MessageAware.html" title="interface in javax.mail"><CODE>MessageAware</CODE></A>,
  119. <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation"><CODE>DataSource</CODE></A>,
  120. <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataContentHandler.html?is-external=true" title="class or interface in javax.activation"><CODE>DataContentHandler</CODE></A></DL>
  121. <HR>
  122.  
  123. <P>
  124.  
  125. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  126.  
  127. <A NAME="constructor_summary"><!-- --></A>
  128. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  129. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  130. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  131. <B>Constructor Summary</B></FONT></TH>
  132. </TR>
  133. <TR BGCOLOR="white" CLASS="TableRowColor">
  134. <TD><CODE><B><A HREF="../../javax/mail/MessageContext.html#MessageContext(javax.mail.Part)">MessageContext</A></B>(<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A>&nbsp;part)</CODE>
  135.  
  136. <BR>
  137. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a MessageContext object describing the context of the given Part.</TD>
  138. </TR>
  139. </TABLE>
  140. &nbsp;
  141. <!-- ========== METHOD SUMMARY =========== -->
  142.  
  143. <A NAME="method_summary"><!-- --></A>
  144. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  145. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  146. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  147. <B>Method Summary</B></FONT></TH>
  148. </TR>
  149. <TR BGCOLOR="white" CLASS="TableRowColor">
  150. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  151. <CODE>&nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></FONT></TD>
  152. <TD><CODE><B><A HREF="../../javax/mail/MessageContext.html#getMessage()">getMessage</A></B>()</CODE>
  153.  
  154. <BR>
  155. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the Message that contains the content.</TD>
  156. </TR>
  157. <TR BGCOLOR="white" CLASS="TableRowColor">
  158. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  159. <CODE>&nbsp;<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A></CODE></FONT></TD>
  160. <TD><CODE><B><A HREF="../../javax/mail/MessageContext.html#getPart()">getPart</A></B>()</CODE>
  161.  
  162. <BR>
  163. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the Part that contains the content.</TD>
  164. </TR>
  165. <TR BGCOLOR="white" CLASS="TableRowColor">
  166. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  167. <CODE>&nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></CODE></FONT></TD>
  168. <TD><CODE><B><A HREF="../../javax/mail/MessageContext.html#getSession()">getSession</A></B>()</CODE>
  169.  
  170. <BR>
  171. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the Session we're operating in.</TD>
  172. </TR>
  173. </TABLE>
  174. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  175. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  176. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  177. <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>
  178. </TR>
  179. <TR BGCOLOR="white" CLASS="TableRowColor">
  180. <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>
  181. </TR>
  182. </TABLE>
  183. &nbsp;
  184. <P>
  185.  
  186. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  187.  
  188. <A NAME="constructor_detail"><!-- --></A>
  189. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  190. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  191. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  192. <B>Constructor Detail</B></FONT></TH>
  193. </TR>
  194. </TABLE>
  195.  
  196. <A NAME="MessageContext(javax.mail.Part)"><!-- --></A><H3>
  197. MessageContext</H3>
  198. <PRE>
  199. public <B>MessageContext</B>(<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A>&nbsp;part)</PRE>
  200. <DL>
  201. <DD>Create a MessageContext object describing the context of the given Part.
  202. <P>
  203. </DL>
  204.  
  205. <!-- ============ METHOD DETAIL ========== -->
  206.  
  207. <A NAME="method_detail"><!-- --></A>
  208. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  209. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  210. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  211. <B>Method Detail</B></FONT></TH>
  212. </TR>
  213. </TABLE>
  214.  
  215. <A NAME="getPart()"><!-- --></A><H3>
  216. getPart</H3>
  217. <PRE>
  218. public <A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A> <B>getPart</B>()</PRE>
  219. <DL>
  220. <DD>Return the Part that contains the content.
  221. <P>
  222. <DD><DL>
  223.  
  224. <DT><B>Returns:</B><DD>the containing Part, or null if not known</DL>
  225. </DD>
  226. </DL>
  227. <HR>
  228.  
  229. <A NAME="getMessage()"><!-- --></A><H3>
  230. getMessage</H3>
  231. <PRE>
  232. public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A> <B>getMessage</B>()</PRE>
  233. <DL>
  234. <DD>Return the Message that contains the content.
  235. Follows the parent chain up through containing Multipart
  236. objects until it comes to a Message object, or null.
  237. <P>
  238. <DD><DL>
  239.  
  240. <DT><B>Returns:</B><DD>the containing Message, or null if not known</DL>
  241. </DD>
  242. </DL>
  243. <HR>
  244.  
  245. <A NAME="getSession()"><!-- --></A><H3>
  246. getSession</H3>
  247. <PRE>
  248. public <A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A> <B>getSession</B>()</PRE>
  249. <DL>
  250. <DD>Return the Session we're operating in.
  251. <P>
  252. <DD><DL>
  253.  
  254. <DT><B>Returns:</B><DD>the Session, or null if not known</DL>
  255. </DD>
  256. </DL>
  257. <!-- ========= END OF CLASS DATA ========= -->
  258. <HR>
  259.  
  260.  
  261. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  262. <A NAME="navbar_bottom"><!-- --></A>
  263. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  264. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  265. <TR>
  266. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  267. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  268. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  269.   <TR ALIGN="center" VALIGN="top">
  270.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  271.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  272.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  273.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MessageContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  274.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  275.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  276.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  277.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  278.   </TR>
  279. </TABLE>
  280. </TD>
  281. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  282. </EM>
  283. </TD>
  284. </TR>
  285.  
  286. <TR>
  287. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  288. &nbsp;<A HREF="../../javax/mail/MessageAware.html" title="interface in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  289. &nbsp;<A HREF="../../javax/mail/MessageRemovedException.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  290. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  291.   <A HREF="../../index.html?javax/mail/MessageContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  292. &nbsp;<A HREF="MessageContext.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  293. &nbsp;<SCRIPT type="text/javascript">
  294.   <!--
  295.   if(window==top) {
  296.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  297.   }
  298.   //-->
  299. </SCRIPT>
  300. <NOSCRIPT>
  301.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  302. </NOSCRIPT>
  303.  
  304.  
  305. </FONT></TD>
  306. </TR>
  307. <TR>
  308. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  309.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  310. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  311. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  312. </TR>
  313. </TABLE>
  314. <A NAME="skip-navbar_bottom"></A>
  315. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  316.  
  317. <HR>
  318. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  319. </BODY>
  320. </HTML>
  321.