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:43 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. MailHandler (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="MailHandler (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/MailHandler.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;PREV CLASS&nbsp;
  60. &nbsp;NEXT CLASS</FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../../../../index.html?com/sun/mail/util/logging/MailHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="MailHandler.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. com.sun.mail.util.logging</FONT>
  93. <BR>
  94. Class MailHandler</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 "><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">java.util.logging.Handler</A>
  98.       <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.mail.util.logging.MailHandler</B>
  99. </PRE>
  100. <HR>
  101. <DL>
  102. <DT><PRE>public class <B>MailHandler</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">Handler</A></DL>
  103. </PRE>
  104.  
  105. <P>
  106. <tt>Handler</tt> that formats log records as an email message.
  107.  
  108.  <p>
  109.  This <tt>Handler</tt> will store a fixed number of log records used to
  110.  generate a single email message.  When the internal buffer reaches capacity,
  111.  all log records are formatted and placed in an email which is sent to an
  112.  email server.  The code to manually setup this handler can be as simple as
  113.  the following:
  114.  
  115.  <tt><pre>
  116.       Properties props = new Properties();
  117.       props.put("mail.smtp.host", "my-mail-server");
  118.       props.put("mail.to", "me@example.com");
  119.       MailHandler h = new MailHandler(props);
  120.       h.setLevel(Level.WARNING);
  121.  </pre></tt>
  122.  
  123.  <p>
  124.  <b>Configuration:</b>
  125.  The LogManager must define at least one or more recipient addresses and a
  126.  mail host for outgoing email.  The code to setup this handler via the
  127.  logging properties can be as simple as the following:
  128.  
  129.  <tt><pre>
  130.       #Default MailHandler settings.
  131.       com.sun.mail.util.logging.MailHandler.mail.smtp.host = my-mail-server
  132.       com.sun.mail.util.logging.MailHandler.mail.to = me@example.com
  133.       com.sun.mail.util.logging.MailHandler.level = WARNING
  134.  </pre></tt>
  135.  
  136.  All mail properties documented in the <tt>Java Mail API</tt> cascade to the
  137.  LogManager by prefixing a key using the fully qualified class name of this
  138.  <tt>MailHandler</tt> dot mail property.  If the prefixed property is not
  139.  found, then the mail property itself is searched in the LogManager.
  140.  By default each <tt>MailHandler</tt> is initialized using the following
  141.  LogManager configuration properties.  If properties are not defined,
  142.  or contain invalid values, then the specified default values are used.
  143.  
  144.  <ul>
  145.  <li>com.sun.mail.util.logging.MailHandler.attachment.filters a comma
  146.  separated list of <tt>Filter</tt> class names used to create each attachment.
  147.  The literal <tt>null</tt> is reserved for attachments that do not require
  148.  filtering. (default is no filters)
  149.  
  150.  <li>com.sun.mail.util.logging.MailHandler.attachment.formatters a comma
  151.  separated list of <tt>Formatter</tt> class names used to create each
  152.  attachment. (default is no attachments)
  153.  
  154.  <li>com.sun.mail.util.logging.MailHandler.attachment.names a comma separated
  155.  list of names or <tt>Formatter</tt> class names of each attachment.
  156.  (default is no attachments names)
  157.  
  158.  <li>com.sun.mail.util.logging.MailHandler.authenticator name of a
  159.  <A HREF="../../../../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A> class used to provide login credentials
  160.  to the email server. (default is <tt>null</tt>)
  161.  
  162.  <li>com.sun.mail.util.logging.MailHandler.capacity the max number of
  163.  <tt>LogRecord</tt> objects include in each email message.
  164.  (defaults to <tt>1000</tt>)
  165.  
  166.  <li>com.sun.mail.util.logging.MailHandler.comparator name of a
  167.  <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A> class used to sort the published
  168.  <tt>LogRecord</tt> objects prior to all formatting.
  169.  (defaults to <tt>null</tt> meaning records are unsorted).
  170.  
  171.  <!--
  172.  <li>com.sun.mail.util.logging.MailHandler.comparator.reverse a boolean
  173.  <tt>true</tt> to reverse the order of the specified comparator or
  174.  <tt>false</tt> to retain the original order. (defaults to <tt>false</tt>)
  175.  -->
  176.  
  177.  <li>com.sun.mail.util.logging.MailHandler.encoding the name of the character
  178.  set encoding to use (defaults to the default platform encoding).
  179.  
  180.  <li>com.sun.mail.util.logging.MailHandler.errorManager name of a
  181.  <tt>ErrorManager</tt> class used to handle any configuration or mail
  182.  transport problems. (defaults to <tt>java.util.logging.ErrorManager</tt>)
  183.  
  184.  <li>com.sun.mail.util.logging.MailHandler.filter name of a <tt>Filter</tt>
  185.  class used for the body of the message. (defaults to <tt>null</tt>,
  186.  allow all records)
  187.  
  188.  <li>com.sun.mail.util.logging.MailHandler.formatter name of <tt>Formatter</tt>
  189.  class used to format the body of this message. (defaults to
  190.  <tt>SimpleFormatter</tt>)
  191.  
  192.  <li>com.sun.mail.util.logging.MailHandler.level specifies the default level
  193.  for this <tt>Handler</tt> (defaults to <tt>Level.WARNING</tt>).
  194.  
  195.  <li>com.sun.mail.util.logging.MailHandler.mail.bcc a comma separated list of
  196.  addresses which will be blind carbon copied.  Typically, this is set to the
  197.  recipients that may need to be privately notified of a log message or
  198.  notified that a log message was sent to a third party such as a support team.
  199.  (defaults to <tt>null</tt>, none)
  200.  
  201.  <li>com.sun.mail.util.logging.MailHandler.mail.cc a comma separated list of
  202.  addresses which will be carbon copied.  Typically, this is set to the
  203.  recipients that may need to be notified of a log message but, are not
  204.  required to provide direct support.  (defaults to <tt>null</tt>, none)
  205.  
  206.  <li>com.sun.mail.util.logging.MailHandler.mail.from a comma separated list of
  207.  addresses which will be from addresses. Typically, this is set to the email
  208.  address identifying the user running the application.
  209.  (defaults to <A HREF="../../../../../javax/mail/Message.html#setFrom()">Message.setFrom()</A>)
  210.  
  211.  <li>com.sun.mail.util.logging.MailHandler.mail.host the host name or IP
  212.  address of the email server. (defaults to <tt>null</tt>, no host)
  213.  
  214.  <li>com.sun.mail.util.logging.MailHandler.mail.reply.to a comma separated
  215.  list of addresses which will be reply-to addresses.  Typically, this is set
  216.  to the recipients that provide support for the application itself.
  217.  (defaults to <tt>null</tt>, none)
  218.  
  219.  <li>com.sun.mail.util.logging.MailHandler.mail.to a comma separated list of
  220.  addresses which will be send-to addresses. Typically, this is set to the
  221.  recipients that provide support for the application, system, and/or
  222.  supporting infrastructure.  (defaults to <tt>null</tt>, none)
  223.  
  224.  <li>com.sun.mail.util.logging.MailHandler.mail.sender a single address
  225.  identifying sender of the email; never equal to the from address.  Typically,
  226.  this is set to the email address identifying the application itself.
  227.  (defaults to <tt>null</tt>, none)
  228.  
  229.  <li>com.sun.mail.util.logging.MailHandler.pushLevel the level which will
  230.  trigger an early push. (defaults to <tt>Level.OFF</tt>, only push when full)
  231.  
  232.  <li>com.sun.mail.util.logging.MailHandler.pushFilter the name of a
  233.  <tt>Filter</tt> class used to trigger an early push.
  234.  (defaults to <tt>null</tt>, no early push)
  235.  
  236.  <li>com.sun.mail.util.logging.MailHandler.subject the name of a
  237.  <tt>Formatter</tt> class or string literal used to create the subject line.
  238.  (defaults to empty string)
  239.  </ul>
  240.  
  241.  <p>
  242.  <b>Sorting:</b>
  243.  All <tt>LogRecord</tt> objects are ordered prior to formatting if this
  244.  <tt>Handler</tt> has a non null comparator.  Developers might be interested
  245.  in sorting the formatted email by thread id, time, and sequence properties
  246.  of a <tt>LogRecord</tt>.  Where as system administrators might be interested
  247.  in sorting the formatted email by thrown, level, time, and sequence
  248.  properties of a <tt>LogRecord</tt>.  If comparator for this handler is
  249.  <tt>null</tt> then the order is unspecified.
  250.  
  251.  <p>
  252.  <b>Formatting:</b>
  253.  The main message body is formatted using the <tt>Formatter</tt> returned by
  254.  <tt>getFormatter()</tt>.  Only records that pass the filter returned by
  255.  <tt>getFilter()</tt> will be included in the message body.  The subject
  256.  <tt>Formatter</tt> will see all <tt>LogRecord</tt> objects that were
  257.  published regardless of the current <tt>Filter</tt>.
  258.  
  259.  <p>
  260.  <b>Attachments:</b>
  261.  This <tt>Handler</tt> allows multiple attachments per each email.
  262.  The attachment order maps directly to the array index order in this
  263.  <tt>Handler</tt> with zero index being the first attachment.  The number of
  264.  attachment formatters controls the number of attachments per email and
  265.  the content type of each attachment.  The attachment filters determine if a
  266.  <tt>LogRecord</tt> will be included in an attachment.  If an attachment
  267.  filter is <tt>null</tt> then all records are included for that attachment.
  268.  Attachments without content will be omitted from email message.  The
  269.  attachment name formatters create the file name for an attachment.
  270.  Custom attachment name formatters can be used to generate an attachment name
  271.  based on the contents of the attachment.
  272.  
  273.  <p>
  274.  <b>Push Level and Push Filter:</b>
  275.  The push method, push level, and optional push filter can be used to
  276.  conditionally trigger a push for log messages that require urgent delivery to
  277.  all recipents.  When a push occurs, the current buffer is formatted into an
  278.  email and is sent to the email server.  If the push method, push level, or
  279.  push filter trigger a push then the outgoing email is flagged as high
  280.  priority.
  281.  
  282.  <p>
  283.  <b>Buffering:</b>
  284.  Log records that are published are stored in an internal buffer.  When this
  285.  buffer reaches capacity the existing records are formatted and sent in an
  286.  email.  Any published records can be sent before reaching capacity by
  287.  explictly calling the <tt>flush</tt>, <tt>push</tt>, or <tt>close</tt>
  288.  methods.  If a circular buffer is required then this handler can be wrapped
  289.  with a <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/MemoryHandler.html?is-external=true" title="class or interface in java.util.logging">MemoryHandler</A> typically with an
  290.  equivalent capacity, level, and push level.
  291.  
  292.  <p>
  293.  <b>Error Handling:</b>
  294.  If the transport of an email message fails, the email is converted to
  295.  a <A HREF="../../../../../javax/mail/internet/MimeMessage.html#writeTo(java.io.OutputStream)">raw</A>
  296.  <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/ByteArrayOutputStream.html?is-external=true#toString(java.lang.String)" title="class or interface in java.io">string</A>
  297.  and is then passed as the <tt>msg</tt> parameter to
  298.  <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#reportError(java.lang.String, java.lang.Exception, int)" title="class or interface in java.util.logging">reportError</A> along with the exception
  299.  describing the cause of the failure.  This allows custom error managers to
  300.  store, <A HREF="../../../../../javax/mail/internet/MimeMessage.html#MimeMessage(javax.mail.Session, java.io.InputStream)">reconstruct</A>, and resend the
  301.  original MimeMessage.  The message parameter string is <b>not</b> a raw email
  302.  if it starts with value returned from <tt>Level.SEVERE.getName()</tt>.
  303.  Custom error managers can use the following test to determine if the
  304.  <tt>msg</tt> parameter from this handler is a raw email:
  305.  
  306.  <tt><pre>
  307.  public void error(String msg, Exception ex, int code) {
  308.       if (msg != null && !msg.startsWith(Level.SEVERE.getName())) {
  309.            //store email message to outbox.
  310.       } else {
  311.           super.error(msg, ex, code);
  312.       }
  313.  }
  314.  </pre></tt>
  315. <P>
  316.  
  317. <P>
  318. <DL>
  319. <DT><B>Since:</B></DT>
  320.   <DD>JavaMail 1.4.3</DD>
  321. </DL>
  322. <HR>
  323.  
  324. <P>
  325.  
  326. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  327.  
  328. <A NAME="constructor_summary"><!-- --></A>
  329. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  330. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  331. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  332. <B>Constructor Summary</B></FONT></TH>
  333. </TR>
  334. <TR BGCOLOR="white" CLASS="TableRowColor">
  335. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#MailHandler()">MailHandler</A></B>()</CODE>
  336.  
  337. <BR>
  338. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <tt>MailHandler</tt> that is configured by the
  339.  <tt>LogManager</tt> configuration properties.</TD>
  340. </TR>
  341. <TR BGCOLOR="white" CLASS="TableRowColor">
  342. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#MailHandler(int)">MailHandler</A></B>(int&nbsp;capacity)</CODE>
  343.  
  344. <BR>
  345. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a mail handler with the specified capacity.</TD>
  346. </TR>
  347. <TR BGCOLOR="white" CLASS="TableRowColor">
  348. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#MailHandler(java.util.Properties)">MailHandler</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>
  349.  
  350. <BR>
  351. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a mail handler with the given mail properties.</TD>
  352. </TR>
  353. </TABLE>
  354. &nbsp;
  355. <!-- ========== METHOD SUMMARY =========== -->
  356.  
  357. <A NAME="method_summary"><!-- --></A>
  358. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  359. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  360. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  361. <B>Method Summary</B></FONT></TH>
  362. </TR>
  363. <TR BGCOLOR="white" CLASS="TableRowColor">
  364. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  365. <CODE>&nbsp;void</CODE></FONT></TD>
  366. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#close()">close</A></B>()</CODE>
  367.  
  368. <BR>
  369. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prevents any other records from being published.</TD>
  370. </TR>
  371. <TR BGCOLOR="white" CLASS="TableRowColor">
  372. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  373. <CODE>&nbsp;void</CODE></FONT></TD>
  374. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#flush()">flush</A></B>()</CODE>
  375.  
  376. <BR>
  377. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pushes any buffered records to the email server as normal priority.</TD>
  378. </TR>
  379. <TR BGCOLOR="white" CLASS="TableRowColor">
  380. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  381. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging">Filter</A>[]</CODE></FONT></TD>
  382. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getAttachmentFilters()">getAttachmentFilters</A></B>()</CODE>
  383.  
  384. <BR>
  385. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the attachment filters.</TD>
  386. </TR>
  387. <TR BGCOLOR="white" CLASS="TableRowColor">
  388. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  389. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>[]</CODE></FONT></TD>
  390. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getAttachmentFormatters()">getAttachmentFormatters</A></B>()</CODE>
  391.  
  392. <BR>
  393. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the attachment formatters.</TD>
  394. </TR>
  395. <TR BGCOLOR="white" CLASS="TableRowColor">
  396. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  397. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>[]</CODE></FONT></TD>
  398. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getAttachmentNames()">getAttachmentNames</A></B>()</CODE>
  399.  
  400. <BR>
  401. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the attachment name formatters.</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/Authenticator.html" title="class in javax.mail">Authenticator</A></CODE></FONT></TD>
  406. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getAuthenticator()">getAuthenticator</A></B>()</CODE>
  407.  
  408. <BR>
  409. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <tt>Authenticator</tt> used to login to the email server.</TD>
  410. </TR>
  411. <TR BGCOLOR="white" CLASS="TableRowColor">
  412. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  413. <CODE>&nbsp;int</CODE></FONT></TD>
  414. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getCapacity()">getCapacity</A></B>()</CODE>
  415.  
  416. <BR>
  417. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the number of log records the internal buffer can hold.</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="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A></CODE></FONT></TD>
  422. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getComparator()">getComparator</A></B>()</CODE>
  423.  
  424. <BR>
  425. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the comparator used to order all <tt>LogRecord</tt> objects prior
  426.  to formatting.</TD>
  427. </TR>
  428. <TR BGCOLOR="white" CLASS="TableRowColor">
  429. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  430. <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>
  431. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getMailProperties()">getMailProperties</A></B>()</CODE>
  432.  
  433. <BR>
  434. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a copy of the mail properties used for the session.</TD>
  435. </TR>
  436. <TR BGCOLOR="white" CLASS="TableRowColor">
  437. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  438. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging">Filter</A></CODE></FONT></TD>
  439. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getPushFilter()">getPushFilter</A></B>()</CODE>
  440.  
  441. <BR>
  442. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the push filter.</TD>
  443. </TR>
  444. <TR BGCOLOR="white" CLASS="TableRowColor">
  445. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  446. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html?is-external=true" title="class or interface in java.util.logging">Level</A></CODE></FONT></TD>
  447. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getPushLevel()">getPushLevel</A></B>()</CODE>
  448.  
  449. <BR>
  450. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the push level.</TD>
  451. </TR>
  452. <TR BGCOLOR="white" CLASS="TableRowColor">
  453. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  454. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A></CODE></FONT></TD>
  455. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#getSubject()">getSubject</A></B>()</CODE>
  456.  
  457. <BR>
  458. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the formatter used to create the subject line.</TD>
  459. </TR>
  460. <TR BGCOLOR="white" CLASS="TableRowColor">
  461. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  462. <CODE>&nbsp;boolean</CODE></FONT></TD>
  463. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#isLoggable(java.util.logging.LogRecord)">isLoggable</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/LogRecord.html?is-external=true" title="class or interface in java.util.logging">LogRecord</A>&nbsp;record)</CODE>
  464.  
  465. <BR>
  466. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check if this <tt>Handler</tt> would actually log a given
  467.  <tt>LogRecord</tt> into its internal buffer.</TD>
  468. </TR>
  469. <TR BGCOLOR="white" CLASS="TableRowColor">
  470. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  471. <CODE>&nbsp;void</CODE></FONT></TD>
  472. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#publish(java.util.logging.LogRecord)">publish</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/LogRecord.html?is-external=true" title="class or interface in java.util.logging">LogRecord</A>&nbsp;record)</CODE>
  473.  
  474. <BR>
  475. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stores a <tt>LogRecord</tt> in the internal buffer.</TD>
  476. </TR>
  477. <TR BGCOLOR="white" CLASS="TableRowColor">
  478. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  479. <CODE>&nbsp;void</CODE></FONT></TD>
  480. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#push()">push</A></B>()</CODE>
  481.  
  482. <BR>
  483. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pushes any buffered records to the email server as high priority.</TD>
  484. </TR>
  485. <TR BGCOLOR="white" CLASS="TableRowColor">
  486. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  487. <CODE>protected &nbsp;void</CODE></FONT></TD>
  488. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#reportError(java.lang.String, java.lang.Exception, int)">reportError</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;msg,
  489.             <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&nbsp;ex,
  490.             int&nbsp;code)</CODE>
  491.  
  492. <BR>
  493. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protected convenience method to report an error to this Handler's
  494. ErrorManager.</TD>
  495. </TR>
  496. <TR BGCOLOR="white" CLASS="TableRowColor">
  497. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  498. <CODE>&nbsp;void</CODE></FONT></TD>
  499. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setAttachmentFilters(java.util.logging.Filter[])">setAttachmentFilters</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging">Filter</A>[]&nbsp;filters)</CODE>
  500.  
  501. <BR>
  502. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the attachment filters.</TD>
  503. </TR>
  504. <TR BGCOLOR="white" CLASS="TableRowColor">
  505. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  506. <CODE>&nbsp;void</CODE></FONT></TD>
  507. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setAttachmentFormatters(java.util.logging.Formatter[])">setAttachmentFormatters</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>[]&nbsp;formatters)</CODE>
  508.  
  509. <BR>
  510. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the attachment <tt>Formatter</tt> object for this handler.</TD>
  511. </TR>
  512. <TR BGCOLOR="white" CLASS="TableRowColor">
  513. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  514. <CODE>&nbsp;void</CODE></FONT></TD>
  515. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setAttachmentNames(java.util.logging.Formatter[])">setAttachmentNames</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>[]&nbsp;formatters)</CODE>
  516.  
  517. <BR>
  518. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the attachment file name formatters.</TD>
  519. </TR>
  520. <TR BGCOLOR="white" CLASS="TableRowColor">
  521. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  522. <CODE>&nbsp;void</CODE></FONT></TD>
  523. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setAttachmentNames(java.lang.String[])">setAttachmentNames</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;names)</CODE>
  524.  
  525. <BR>
  526. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the attachment file name for each attachment.</TD>
  527. </TR>
  528. <TR BGCOLOR="white" CLASS="TableRowColor">
  529. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  530. <CODE>&nbsp;void</CODE></FONT></TD>
  531. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setAuthenticator(javax.mail.Authenticator)">setAuthenticator</A></B>(<A HREF="../../../../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;auth)</CODE>
  532.  
  533. <BR>
  534. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <tt>Authenticator</tt> used to login to the email server.</TD>
  535. </TR>
  536. <TR BGCOLOR="white" CLASS="TableRowColor">
  537. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  538. <CODE>&nbsp;void</CODE></FONT></TD>
  539. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setComparator(java.util.Comparator)">setComparator</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&nbsp;c)</CODE>
  540.  
  541. <BR>
  542. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the comparator used to order all <tt>LogRecord</tt> objects prior
  543. to formatting.</TD>
  544. </TR>
  545. <TR BGCOLOR="white" CLASS="TableRowColor">
  546. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  547. <CODE>&nbsp;void</CODE></FONT></TD>
  548. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setLevel(java.util.logging.Level)">setLevel</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html?is-external=true" title="class or interface in java.util.logging">Level</A>&nbsp;newLevel)</CODE>
  549.  
  550. <BR>
  551. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the log level specifying which message levels will be
  552. logged by this <tt>Handler</tt>.</TD>
  553. </TR>
  554. <TR BGCOLOR="white" CLASS="TableRowColor">
  555. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  556. <CODE>&nbsp;void</CODE></FONT></TD>
  557. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setMailProperties(java.util.Properties)">setMailProperties</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>
  558.  
  559. <BR>
  560. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the mail properties used for the session.</TD>
  561. </TR>
  562. <TR BGCOLOR="white" CLASS="TableRowColor">
  563. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  564. <CODE>&nbsp;void</CODE></FONT></TD>
  565. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setPushFilter(java.util.logging.Filter)">setPushFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging">Filter</A>&nbsp;filter)</CODE>
  566.  
  567. <BR>
  568. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the push filter.</TD>
  569. </TR>
  570. <TR BGCOLOR="white" CLASS="TableRowColor">
  571. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  572. <CODE>&nbsp;void</CODE></FONT></TD>
  573. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setPushLevel(java.util.logging.Level)">setPushLevel</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html?is-external=true" title="class or interface in java.util.logging">Level</A>&nbsp;level)</CODE>
  574.  
  575. <BR>
  576. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the push level.</TD>
  577. </TR>
  578. <TR BGCOLOR="white" CLASS="TableRowColor">
  579. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  580. <CODE>&nbsp;void</CODE></FONT></TD>
  581. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setSubject(java.util.logging.Formatter)">setSubject</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>&nbsp;format)</CODE>
  582.  
  583. <BR>
  584. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the subject formatter for email.</TD>
  585. </TR>
  586. <TR BGCOLOR="white" CLASS="TableRowColor">
  587. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  588. <CODE>&nbsp;void</CODE></FONT></TD>
  589. <TD><CODE><B><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#setSubject(java.lang.String)">setSubject</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;subject)</CODE>
  590.  
  591. <BR>
  592. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a literal string for the email subject.</TD>
  593. </TR>
  594. </TABLE>
  595. &nbsp;<A NAME="methods_inherited_from_class_java.util.logging.Handler"><!-- --></A>
  596. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  597. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  598. <TH ALIGN="left"><B>Methods inherited from class java.util.logging.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">Handler</A></B></TH>
  599. </TR>
  600. <TR BGCOLOR="white" CLASS="TableRowColor">
  601. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#getEncoding()" title="class or interface in java.util.logging">getEncoding</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#getErrorManager()" title="class or interface in java.util.logging">getErrorManager</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#getFilter()" title="class or interface in java.util.logging">getFilter</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#getFormatter()" title="class or interface in java.util.logging">getFormatter</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#getLevel()" title="class or interface in java.util.logging">getLevel</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#setEncoding(java.lang.String)" title="class or interface in java.util.logging">setEncoding</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#setErrorManager(java.util.logging.ErrorManager)" title="class or interface in java.util.logging">setErrorManager</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#setFilter(java.util.logging.Filter)" title="class or interface in java.util.logging">setFilter</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#setFormatter(java.util.logging.Formatter)" title="class or interface in java.util.logging">setFormatter</A></CODE></TD>
  602. </TR>
  603. </TABLE>
  604. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  605. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  606. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  607. <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>
  608. </TR>
  609. <TR BGCOLOR="white" CLASS="TableRowColor">
  610. <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>
  611. </TR>
  612. </TABLE>
  613. &nbsp;
  614. <P>
  615.  
  616. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  617.  
  618. <A NAME="constructor_detail"><!-- --></A>
  619. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  620. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  621. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  622. <B>Constructor Detail</B></FONT></TH>
  623. </TR>
  624. </TABLE>
  625.  
  626. <A NAME="MailHandler()"><!-- --></A><H3>
  627. MailHandler</H3>
  628. <PRE>
  629. public <B>MailHandler</B>()</PRE>
  630. <DL>
  631. <DD>Creates a <tt>MailHandler</tt> that is configured by the
  632. <tt>LogManager</tt> configuration properties.
  633. <P>
  634. <DL>
  635.  
  636. <DT><B>Throws:</B>
  637. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  638. caller does not have <tt>LoggingPermission("control")</tt>.</DL>
  639. </DL>
  640. <HR>
  641.  
  642. <A NAME="MailHandler(int)"><!-- --></A><H3>
  643. MailHandler</H3>
  644. <PRE>
  645. public <B>MailHandler</B>(int&nbsp;capacity)</PRE>
  646. <DL>
  647. <DD>Creates a mail handler with the specified capacity.
  648. <P>
  649. <DL>
  650. <DT><B>Parameters:</B><DD><CODE>capacity</CODE> - of the internal buffer.
  651. <DT><B>Throws:</B>
  652. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <tt>capacity</tt> less than one.
  653. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  654. caller does not have <tt>LoggingPermission("control")</tt>.</DL>
  655. </DL>
  656. <HR>
  657.  
  658. <A NAME="MailHandler(java.util.Properties)"><!-- --></A><H3>
  659. MailHandler</H3>
  660. <PRE>
  661. public <B>MailHandler</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>
  662. <DL>
  663. <DD>Creates a mail handler with the given mail properties.
  664. The key/value pairs are defined in the <tt>Java Mail API</tt>
  665. documentation.  This <tt>Handler</tt> will also search the
  666. <tt>LogManager</tt> for defaults if needed.
  667. <P>
  668. <DL>
  669. <DT><B>Parameters:</B><DD><CODE>props</CODE> - a non <tt>null</tt> properties object.
  670. <DT><B>Throws:</B>
  671. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <tt>props</tt> is <tt>null</tt>.
  672. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  673. caller does not have <tt>LoggingPermission("control")</tt>.</DL>
  674. </DL>
  675.  
  676. <!-- ============ METHOD DETAIL ========== -->
  677.  
  678. <A NAME="method_detail"><!-- --></A>
  679. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  680. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  681. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  682. <B>Method Detail</B></FONT></TH>
  683. </TR>
  684. </TABLE>
  685.  
  686. <A NAME="isLoggable(java.util.logging.LogRecord)"><!-- --></A><H3>
  687. isLoggable</H3>
  688. <PRE>
  689. public boolean <B>isLoggable</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/LogRecord.html?is-external=true" title="class or interface in java.util.logging">LogRecord</A>&nbsp;record)</PRE>
  690. <DL>
  691. <DD>Check if this <tt>Handler</tt> would actually log a given
  692. <tt>LogRecord</tt> into its internal buffer.
  693. <p>
  694. This method checks if the <tt>LogRecord</tt> has an appropriate level and
  695. whether it satisfies any <tt>Filter</tt> including any attachment filters.
  696. However it does <b>not</b> check whether the <tt>LogRecord</tt> would
  697. result in a "push" of the buffer contents.
  698. <p>
  699. <P>
  700. <DD><DL>
  701. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#isLoggable(java.util.logging.LogRecord)" title="class or interface in java.util.logging">isLoggable</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">Handler</A></CODE></DL>
  702. </DD>
  703. <DD><DL>
  704. <DT><B>Parameters:</B><DD><CODE>record</CODE> - a <tt>LogRecord</tt>
  705. <DT><B>Returns:</B><DD>true if the <tt>LogRecord</tt> would be logged.</DL>
  706. </DD>
  707. </DL>
  708. <HR>
  709.  
  710. <A NAME="publish(java.util.logging.LogRecord)"><!-- --></A><H3>
  711. publish</H3>
  712. <PRE>
  713. public void <B>publish</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/LogRecord.html?is-external=true" title="class or interface in java.util.logging">LogRecord</A>&nbsp;record)</PRE>
  714. <DL>
  715. <DD>Stores a <tt>LogRecord</tt> in the internal buffer.
  716. <p>
  717. The <tt>isLoggable</tt> method is called to check if the given log record
  718. is loggable. If the given record is loggable, it is copied into
  719. an internal buffer.  Then the record's level property is compared with
  720.  the push level. If the given level of the <tt>LogRecord</tt>
  721.  is greater than or equal to the push level then the push filter is
  722.  called.  If no push filter exists, the push filter returns true,
  723.  or the capacity of the internal buffer has been reached then all buffered
  724.  records are formatted into one email and sent to the server.
  725. <P>
  726. <DD><DL>
  727. <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#publish(java.util.logging.LogRecord)" title="class or interface in java.util.logging">publish</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">Handler</A></CODE></DL>
  728. </DD>
  729. <DD><DL>
  730. <DT><B>Parameters:</B><DD><CODE>record</CODE> - description of the log event.</DL>
  731. </DD>
  732. </DL>
  733. <HR>
  734.  
  735. <A NAME="push()"><!-- --></A><H3>
  736. push</H3>
  737. <PRE>
  738. public void <B>push</B>()</PRE>
  739. <DL>
  740. <DD>Pushes any buffered records to the email server as high priority.
  741.  The internal buffer is then cleared.  Does nothing if called from inside
  742.  a push.
  743. <P>
  744. <DD><DL>
  745. <DT><B>See Also:</B><DD><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#flush()"><CODE>flush()</CODE></A></DL>
  746. </DD>
  747. </DL>
  748. <HR>
  749.  
  750. <A NAME="flush()"><!-- --></A><H3>
  751. flush</H3>
  752. <PRE>
  753. public void <B>flush</B>()</PRE>
  754. <DL>
  755. <DD>Pushes any buffered records to the email server as normal priority.
  756.  The internal buffer is then cleared.  Does nothing if called from inside
  757.  a push.
  758. <P>
  759. <DD><DL>
  760. <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#flush()" title="class or interface in java.util.logging">flush</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">Handler</A></CODE></DL>
  761. </DD>
  762. <DD><DL>
  763. <DT><B>See Also:</B><DD><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#push()"><CODE>push()</CODE></A></DL>
  764. </DD>
  765. </DL>
  766. <HR>
  767.  
  768. <A NAME="close()"><!-- --></A><H3>
  769. close</H3>
  770. <PRE>
  771. public void <B>close</B>()</PRE>
  772. <DL>
  773. <DD>Prevents any other records from being published.
  774.  Pushes any buffered records to the email server as normal priority.
  775.  The internal buffer is then cleared.  Once this handler is closed it
  776.  will remain closed.
  777. <P>
  778. <DD><DL>
  779. <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#close()" title="class or interface in java.util.logging">close</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">Handler</A></CODE></DL>
  780. </DD>
  781. <DD><DL>
  782.  
  783. <DT><B>Throws:</B>
  784. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  785.  caller does not have <tt>LoggingPermission("control")</tt>.<DT><B>See Also:</B><DD><A HREF="../../../../../com/sun/mail/util/logging/MailHandler.html#flush()"><CODE>flush()</CODE></A></DL>
  786. </DD>
  787. </DL>
  788. <HR>
  789.  
  790. <A NAME="setLevel(java.util.logging.Level)"><!-- --></A><H3>
  791. setLevel</H3>
  792. <PRE>
  793. public void <B>setLevel</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html?is-external=true" title="class or interface in java.util.logging">Level</A>&nbsp;newLevel)</PRE>
  794. <DL>
  795. <DD>Set the log level specifying which message levels will be
  796.  logged by this <tt>Handler</tt>.  Message levels lower than this
  797.  value will be discarded.
  798. <P>
  799. <DD><DL>
  800. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#setLevel(java.util.logging.Level)" title="class or interface in java.util.logging">setLevel</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">Handler</A></CODE></DL>
  801. </DD>
  802. <DD><DL>
  803. <DT><B>Parameters:</B><DD><CODE>newLevel</CODE> - the new value for the log level
  804. <DT><B>Throws:</B>
  805. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and
  806.           the caller does not have <tt>LoggingPermission("control")</tt>.</DL>
  807. </DD>
  808. </DL>
  809. <HR>
  810.  
  811. <A NAME="getPushLevel()"><!-- --></A><H3>
  812. getPushLevel</H3>
  813. <PRE>
  814. public final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html?is-external=true" title="class or interface in java.util.logging">Level</A> <B>getPushLevel</B>()</PRE>
  815. <DL>
  816. <DD>Gets the push level.  The default is <tt>Level.OFF</tt> meaning that
  817.  this <tt>Handler</tt> will only push when the internal buffer is full.
  818. <P>
  819. <DD><DL>
  820.  
  821. <DT><B>Returns:</B><DD>the push level.</DL>
  822. </DD>
  823. </DL>
  824. <HR>
  825.  
  826. <A NAME="setPushLevel(java.util.logging.Level)"><!-- --></A><H3>
  827. setPushLevel</H3>
  828. <PRE>
  829. public final void <B>setPushLevel</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html?is-external=true" title="class or interface in java.util.logging">Level</A>&nbsp;level)</PRE>
  830. <DL>
  831. <DD>Sets the push level.  This level is used to trigger a push so that
  832.  all pending records are formatted and sent to the email server.  When
  833.  the push level triggers a send, the resulting email is flagged as
  834.  high priority.
  835. <P>
  836. <DD><DL>
  837. <DT><B>Parameters:</B><DD><CODE>level</CODE> - Level object.
  838. <DT><B>Throws:</B>
  839. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <tt>level</tt> is <tt>null</tt>
  840. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  841.  caller does not have <tt>LoggingPermission("control")</tt>.
  842. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  843. </DD>
  844. </DL>
  845. <HR>
  846.  
  847. <A NAME="getPushFilter()"><!-- --></A><H3>
  848. getPushFilter</H3>
  849. <PRE>
  850. public final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging">Filter</A> <B>getPushFilter</B>()</PRE>
  851. <DL>
  852. <DD>Gets the push filter.  The default is <tt>null</tt>.
  853. <P>
  854. <DD><DL>
  855.  
  856. <DT><B>Returns:</B><DD>the push filter or <tt>null</tt>.</DL>
  857. </DD>
  858. </DL>
  859. <HR>
  860.  
  861. <A NAME="setPushFilter(java.util.logging.Filter)"><!-- --></A><H3>
  862. setPushFilter</H3>
  863. <PRE>
  864. public final void <B>setPushFilter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging">Filter</A>&nbsp;filter)</PRE>
  865. <DL>
  866. <DD>Sets the push filter.  This filter is only called if the given
  867.  <tt>LogRecord</tt> level was greater than the push level.  If this
  868.  filter returns <tt>true</tt>, all pending records are formatted and sent
  869.  to the email server.  When the push filter triggers a send, the resulting
  870.  email is flagged as high priority.
  871. <P>
  872. <DD><DL>
  873. <DT><B>Parameters:</B><DD><CODE>filter</CODE> - push filter or <tt>null</tt>
  874. <DT><B>Throws:</B>
  875. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  876.  caller does not have <tt>LoggingPermission("control")</tt>.</DL>
  877. </DD>
  878. </DL>
  879. <HR>
  880.  
  881. <A NAME="getComparator()"><!-- --></A><H3>
  882. getComparator</H3>
  883. <PRE>
  884. public final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A> <B>getComparator</B>()</PRE>
  885. <DL>
  886. <DD>Gets the comparator used to order all <tt>LogRecord</tt> objects prior
  887.  to formatting.  If <tt>null</tt> then the order is unspecified.
  888. <P>
  889. <DD><DL>
  890.  
  891. <DT><B>Returns:</B><DD>the <tt>LogRecord</tt> comparator.</DL>
  892. </DD>
  893. </DL>
  894. <HR>
  895.  
  896. <A NAME="setComparator(java.util.Comparator)"><!-- --></A><H3>
  897. setComparator</H3>
  898. <PRE>
  899. public final void <B>setComparator</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&nbsp;c)</PRE>
  900. <DL>
  901. <DD>Sets the comparator used to order all <tt>LogRecord</tt> objects prior
  902.  to formatting.  If <tt>null</tt> then the order is unspecified.
  903. <P>
  904. <DD><DL>
  905. <DT><B>Parameters:</B><DD><CODE>c</CODE> - the <tt>LogRecord</tt> comparator.
  906. <DT><B>Throws:</B>
  907. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  908.  caller does not have <tt>LoggingPermission("control")</tt>.
  909. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  910. </DD>
  911. </DL>
  912. <HR>
  913.  
  914. <A NAME="getCapacity()"><!-- --></A><H3>
  915. getCapacity</H3>
  916. <PRE>
  917. public final int <B>getCapacity</B>()</PRE>
  918. <DL>
  919. <DD>Gets the number of log records the internal buffer can hold.  When
  920.  capacity is reached, <tt>Handler</tt> will format all <tt>LogRecord</tt>
  921.  objects into one email message.
  922. <P>
  923. <DD><DL>
  924.  
  925. <DT><B>Returns:</B><DD>the capacity.</DL>
  926. </DD>
  927. </DL>
  928. <HR>
  929.  
  930. <A NAME="getAuthenticator()"><!-- --></A><H3>
  931. getAuthenticator</H3>
  932. <PRE>
  933. public final <A HREF="../../../../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A> <B>getAuthenticator</B>()</PRE>
  934. <DL>
  935. <DD>Gets the <tt>Authenticator</tt> used to login to the email server.
  936. <P>
  937. <DD><DL>
  938.  
  939. <DT><B>Returns:</B><DD>an <tt>Authenticator</tt> or <tt>null</tt> if none is required.
  940. <DT><B>Throws:</B>
  941. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  942.  caller does not have <tt>LoggingPermission("control")</tt>.</DL>
  943. </DD>
  944. </DL>
  945. <HR>
  946.  
  947. <A NAME="setAuthenticator(javax.mail.Authenticator)"><!-- --></A><H3>
  948. setAuthenticator</H3>
  949. <PRE>
  950. public final void <B>setAuthenticator</B>(<A HREF="../../../../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A>&nbsp;auth)</PRE>
  951. <DL>
  952. <DD>Gets the <tt>Authenticator</tt> used to login to the email server.
  953. <P>
  954. <DD><DL>
  955. <DT><B>Parameters:</B><DD><CODE>auth</CODE> - an <tt>Authenticator</tt> object or null if none is required.
  956. <DT><B>Throws:</B>
  957. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  958.  caller does not have <tt>LoggingPermission("control")</tt>.
  959. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  960. </DD>
  961. </DL>
  962. <HR>
  963.  
  964. <A NAME="setMailProperties(java.util.Properties)"><!-- --></A><H3>
  965. setMailProperties</H3>
  966. <PRE>
  967. public final void <B>setMailProperties</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>
  968. <DL>
  969. <DD>Sets the mail properties used for the session.  The key/value pairs
  970.  are defined in the <tt>Java Mail API</tt> documentation.  This
  971.  <tt>Handler</tt> will also search the <tt>LogManager</tt> for defaults
  972.  if needed.
  973. <P>
  974. <DD><DL>
  975. <DT><B>Parameters:</B><DD><CODE>props</CODE> - a non <tt>null</tt> properties object.
  976. <DT><B>Throws:</B>
  977. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  978.  caller does not have <tt>LoggingPermission("control")</tt>.
  979. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <tt>props</tt> is <tt>null</tt>.
  980. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  981. </DD>
  982. </DL>
  983. <HR>
  984.  
  985. <A NAME="getMailProperties()"><!-- --></A><H3>
  986. getMailProperties</H3>
  987. <PRE>
  988. public final <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>getMailProperties</B>()</PRE>
  989. <DL>
  990. <DD>Gets a copy of the mail properties used for the session.
  991. <P>
  992. <DD><DL>
  993.  
  994. <DT><B>Returns:</B><DD>a non null properties object.
  995. <DT><B>Throws:</B>
  996. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  997.  caller does not have <tt>LoggingPermission("control")</tt>.</DL>
  998. </DD>
  999. </DL>
  1000. <HR>
  1001.  
  1002. <A NAME="getAttachmentFilters()"><!-- --></A><H3>
  1003. getAttachmentFilters</H3>
  1004. <PRE>
  1005. public final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging">Filter</A>[] <B>getAttachmentFilters</B>()</PRE>
  1006. <DL>
  1007. <DD>Gets the attachment filters.  If the attachment filter does not
  1008.  allow any <tt>LogRecord</tt> to be formatted, the attachment may
  1009.  be omitted from the email.
  1010. <P>
  1011. <DD><DL>
  1012.  
  1013. <DT><B>Returns:</B><DD>a non null array of attachment filters.</DL>
  1014. </DD>
  1015. </DL>
  1016. <HR>
  1017.  
  1018. <A NAME="setAttachmentFilters(java.util.logging.Filter[])"><!-- --></A><H3>
  1019. setAttachmentFilters</H3>
  1020. <PRE>
  1021. public final void <B>setAttachmentFilters</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging">Filter</A>[]&nbsp;filters)</PRE>
  1022. <DL>
  1023. <DD>Sets the attachment filters.
  1024. <P>
  1025. <DD><DL>
  1026. <DT><B>Parameters:</B><DD><CODE>filters</CODE> - a non <tt>null</tt> array of filters.  A <tt>null</tt>
  1027.  index value is allowed.  A <tt>null</tt> value means that all
  1028.  records are allowed for the attachment at that index.
  1029. <DT><B>Throws:</B>
  1030. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  1031.  caller does not have <tt>LoggingPermission("control")</tt>.
  1032. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <tt>filters</tt> is <tt>null</tt>
  1033. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the number of attachment
  1034.  name formatters do not match the number of attachment formatters.
  1035. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  1036. </DD>
  1037. </DL>
  1038. <HR>
  1039.  
  1040. <A NAME="getAttachmentFormatters()"><!-- --></A><H3>
  1041. getAttachmentFormatters</H3>
  1042. <PRE>
  1043. public final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>[] <B>getAttachmentFormatters</B>()</PRE>
  1044. <DL>
  1045. <DD>Gets the attachment formatters.  This <tt>Handler</tt> is using
  1046.  attachments only if the returned array length is non zero.
  1047. <P>
  1048. <DD><DL>
  1049.  
  1050. <DT><B>Returns:</B><DD>a non <tt>null</tt> array of formatters.</DL>
  1051. </DD>
  1052. </DL>
  1053. <HR>
  1054.  
  1055. <A NAME="setAttachmentFormatters(java.util.logging.Formatter[])"><!-- --></A><H3>
  1056. setAttachmentFormatters</H3>
  1057. <PRE>
  1058. public final void <B>setAttachmentFormatters</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>[]&nbsp;formatters)</PRE>
  1059. <DL>
  1060. <DD>Sets the attachment <tt>Formatter</tt> object for this handler.
  1061.  The number of formatters determines the number of attachments per
  1062.  email.  This method should be the first attachment method called.
  1063.  To remove all attachments, call this method with empty array.
  1064. <P>
  1065. <DD><DL>
  1066. <DT><B>Parameters:</B><DD><CODE>formatters</CODE> - a non null array of formatters.
  1067. <DT><B>Throws:</B>
  1068. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  1069.  caller does not have <tt>LoggingPermission("control")</tt>.
  1070. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if the given array or any array index is
  1071.  <tt>null</tt>.
  1072. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  1073. </DD>
  1074. </DL>
  1075. <HR>
  1076.  
  1077. <A NAME="getAttachmentNames()"><!-- --></A><H3>
  1078. getAttachmentNames</H3>
  1079. <PRE>
  1080. public final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>[] <B>getAttachmentNames</B>()</PRE>
  1081. <DL>
  1082. <DD>Gets the attachment name formatters.
  1083.  If the attachment names were set using explicit names then
  1084.  the names can be returned by calling <tt>toString</tt> on each
  1085.  attachment name formatter.
  1086. <P>
  1087. <DD><DL>
  1088.  
  1089. <DT><B>Returns:</B><DD>non <tt>null</tt> array of attachment name formatters.</DL>
  1090. </DD>
  1091. </DL>
  1092. <HR>
  1093.  
  1094. <A NAME="setAttachmentNames(java.lang.String[])"><!-- --></A><H3>
  1095. setAttachmentNames</H3>
  1096. <PRE>
  1097. public final void <B>setAttachmentNames</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;names)</PRE>
  1098. <DL>
  1099. <DD>Sets the attachment file name for each attachment.  This method will
  1100.  create a set of custom formatters.
  1101. <P>
  1102. <DD><DL>
  1103. <DT><B>Parameters:</B><DD><CODE>names</CODE> - an array of names.
  1104. <DT><B>Throws:</B>
  1105. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  1106.  caller does not have <tt>LoggingPermission("control")</tt>.
  1107. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the number of attachment
  1108.  names do not match the number of attachment formatters.
  1109. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if any name is empty.
  1110. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if any given array or name is <tt>null</tt>.
  1111. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  1112. </DD>
  1113. </DL>
  1114. <HR>
  1115.  
  1116. <A NAME="setAttachmentNames(java.util.logging.Formatter[])"><!-- --></A><H3>
  1117. setAttachmentNames</H3>
  1118. <PRE>
  1119. public final void <B>setAttachmentNames</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>[]&nbsp;formatters)</PRE>
  1120. <DL>
  1121. <DD>Sets the attachment file name formatters.  The format method of each
  1122.  attachment formatter will see only the <tt>LogRecord</tt> objects that
  1123.  passed its attachment filter during formatting. The format method should
  1124.  always return the empty string. Instead of being used to format records,
  1125.  it is used to gather information about the contents of an attachment.
  1126.  The <tt>getTail</tt> method should be used to construct the attachment
  1127.  file name and reset any formatter collected state.
  1128. <P>
  1129. <DD><DL>
  1130. <DT><B>Parameters:</B><DD><CODE>formatters</CODE> - and array of attachment name formatters.
  1131. <DT><B>Throws:</B>
  1132. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  1133.  caller does not have <tt>LoggingPermission("control")</tt>.
  1134. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the number of attachment
  1135.  name formatters do not match the number of attachment formatters.
  1136. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if any given array or name is <tt>null</tt>.
  1137. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  1138. </DD>
  1139. </DL>
  1140. <HR>
  1141.  
  1142. <A NAME="getSubject()"><!-- --></A><H3>
  1143. getSubject</H3>
  1144. <PRE>
  1145. public final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A> <B>getSubject</B>()</PRE>
  1146. <DL>
  1147. <DD>Gets the formatter used to create the subject line.
  1148.  If the subject was created using a literal string then
  1149.  the <tt>toString</tt> method can be used to get the subject line.
  1150. <P>
  1151. <DD><DL>
  1152.  
  1153. <DT><B>Returns:</B><DD>the formatter.</DL>
  1154. </DD>
  1155. </DL>
  1156. <HR>
  1157.  
  1158. <A NAME="setSubject(java.lang.String)"><!-- --></A><H3>
  1159. setSubject</H3>
  1160. <PRE>
  1161. public final void <B>setSubject</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;subject)</PRE>
  1162. <DL>
  1163. <DD>Sets a literal string for the email subject.
  1164. <P>
  1165. <DD><DL>
  1166. <DT><B>Parameters:</B><DD><CODE>subject</CODE> - a non <tt>null</tt> string.
  1167. <DT><B>Throws:</B>
  1168. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  1169.  caller does not have <tt>LoggingPermission("control")</tt>.
  1170. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <tt>subject</tt> is <tt>null</tt>.
  1171. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  1172. </DD>
  1173. </DL>
  1174. <HR>
  1175.  
  1176. <A NAME="setSubject(java.util.logging.Formatter)"><!-- --></A><H3>
  1177. setSubject</H3>
  1178. <PRE>
  1179. public final void <B>setSubject</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html?is-external=true" title="class or interface in java.util.logging">Formatter</A>&nbsp;format)</PRE>
  1180. <DL>
  1181. <DD>Sets the subject formatter for email.  The format method of the subject
  1182.  formatter will see all <tt>LogRecord</tt> objects that were published to
  1183.  this <tt>Handler</tt> during formatting and should always return the empty
  1184.  string.  This formatter is used to gather information to create a summary
  1185.  about what information is contained in the email.  The <tt>getTail</tt>
  1186.  method should be used to construct the subject and reset any
  1187.  formatter collected state.  The <tt>toString</tt> method of the given
  1188.  formatter should be overridden to provide a useful subject, if possible.
  1189. <P>
  1190. <DD><DL>
  1191. <DT><B>Parameters:</B><DD><CODE>format</CODE> - the subject formatter.
  1192. <DT><B>Throws:</B>
  1193. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</A></CODE> - if a security manager exists and the
  1194.  caller does not have <tt>LoggingPermission("control")</tt>.
  1195. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <tt>format</tt> is <tt>null</tt>.
  1196. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if called from inside a push.</DL>
  1197. </DD>
  1198. </DL>
  1199. <HR>
  1200.  
  1201. <A NAME="reportError(java.lang.String, java.lang.Exception, int)"><!-- --></A><H3>
  1202. reportError</H3>
  1203. <PRE>
  1204. protected void <B>reportError</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;msg,
  1205.                            <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&nbsp;ex,
  1206.                            int&nbsp;code)</PRE>
  1207. <DL>
  1208. <DD>Protected convenience method to report an error to this Handler's
  1209. ErrorManager.  This method will prefix all non null error messages with
  1210. <tt>Level.SEVERE.getName()</tt>.  This allows the receiving error
  1211. manager to determine if the <tt>msg</tt> parameter is a simple error
  1212. message or a raw email message.
  1213. <P>
  1214. <DD><DL>
  1215. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true#reportError(java.lang.String, java.lang.Exception, int)" title="class or interface in java.util.logging">reportError</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Handler.html?is-external=true" title="class or interface in java.util.logging">Handler</A></CODE></DL>
  1216. </DD>
  1217. <DD><DL>
  1218. <DT><B>Parameters:</B><DD><CODE>msg</CODE> - a descriptive string (may be null)<DD><CODE>ex</CODE> - an exception (may be null)<DD><CODE>code</CODE> - an error code defined in ErrorManager</DL>
  1219. </DD>
  1220. </DL>
  1221. <!-- ========= END OF CLASS DATA ========= -->
  1222. <HR>
  1223.  
  1224.  
  1225. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  1226. <A NAME="navbar_bottom"><!-- --></A>
  1227. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  1228. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  1229. <TR>
  1230. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  1231. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  1232. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  1233.  <TR ALIGN="center" VALIGN="top">
  1234.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  1235.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  1236.  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  1237.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MailHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  1238.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  1239.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  1240.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  1241.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  1242.  </TR>
  1243. </TABLE>
  1244. </TD>
  1245. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  1246. </EM>
  1247. </TD>
  1248. </TR>
  1249.  
  1250. <TR>
  1251. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  1252. &nbsp;PREV CLASS&nbsp;
  1253. &nbsp;NEXT CLASS</FONT></TD>
  1254. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  1255.  <A HREF="../../../../../index.html?com/sun/mail/util/logging/MailHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  1256. &nbsp;<A HREF="MailHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  1257. &nbsp;<SCRIPT type="text/javascript">
  1258.  <!--
  1259.  if(window==top) {
  1260.    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  1261.  }
  1262.  //-->
  1263. </SCRIPT>
  1264. <NOSCRIPT>
  1265.  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  1266. </NOSCRIPT>
  1267.  
  1268.  
  1269. </FONT></TD>
  1270. </TR>
  1271. <TR>
  1272. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  1273.  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  1274. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  1275. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  1276. </TR>
  1277. </TABLE>
  1278. <A NAME="skip-navbar_bottom"></A>
  1279. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  1280.  
  1281. <HR>
  1282. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  1283. </BODY>
  1284. </HTML>
  1285.