com.arsdigita.mail
Class MailQueue

java.lang.Object
  extended bycom.arsdigita.mail.MailQueue

public class MailQueue
extends Object

Bundles a number of messages and sends them all at once. Saves the overhead of opening a separate connection to the SMTP server for each individual message.

Version:
$Id: //core-platform/dev/src/com/arsdigita/mail/MailQueue.java#7 $
Author:
Ron Henderson

Field Summary
static String versionId
           
 
Constructor Summary
MailQueue()
          Creates an empty mail queue.
 
Method Summary
 void addMail(Mail msg)
          Adds a mail message to the queue.
 int getCount()
          Gets the number of messages in the queue.
 void send()
          Sends all messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

MailQueue

public MailQueue()
Creates an empty mail queue.

Method Detail

addMail

public void addMail(Mail msg)
Adds a mail message to the queue.

Parameters:
msg - the message to add

getCount

public int getCount()
Gets the number of messages in the queue.

Returns:
the number of messages in the queue

send

public void send()
          throws javax.mail.MessagingException,
                 javax.mail.SendFailedException
Sends all messages.

Throws:
javax.mail.MessagingException
javax.mail.SendFailedException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC