pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.email
Class QueueItem

java.lang.Object
  extended by org.torweg.pulse.email.QueueItem
All Implemented Interfaces:
java.io.Serializable

public final class QueueItem
extends java.lang.Object
implements java.io.Serializable

an object encapsulating both Email and MimeMessage objects.

Version:
$Revision: 1388 $
Author:
Thomas Weber
See Also:
Serialized Form

Nested Class Summary
static class QueueItem.MimeMessageWrapper
          wraps a MimeMessage to make it serializable.
 
Constructor Summary
protected QueueItem(Email e)
          builds a QueueItem for an Email.
protected QueueItem(javax.mail.internet.MimeMessage m)
          builds a QueueItem for a MimeMessage.
 
Method Summary
protected  Email getEmail()
          returns the encapsulated Email or null, if the encapsulated object is an MimeMessage.
protected  int getFailCount()
          returns the number of sending failures.
protected  javax.mail.internet.MimeMessage getMimeMessage()
          returns the encapsulated MimeMessage or null, if the encapsulated object is an Email.
protected  QueueItem increaseFailCount()
          increases the number of sending failures by 1.
protected  boolean isMimeMessage()
          returns true, if the contained object is a MimeMessage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueItem

protected QueueItem(javax.mail.internet.MimeMessage m)
builds a QueueItem for a MimeMessage.

Parameters:
m - the MIME message to encapsulate

QueueItem

protected QueueItem(Email e)
builds a QueueItem for an Email.

Parameters:
e - the e-mail to encapsulate
Method Detail

isMimeMessage

protected boolean isMimeMessage()
returns true, if the contained object is a MimeMessage.

Returns:
true, if the contained object is a MimeMessage. Otherwise false.

getMimeMessage

protected javax.mail.internet.MimeMessage getMimeMessage()
returns the encapsulated MimeMessage or null, if the encapsulated object is an Email.

Returns:
the encapsulated MimeMessage or null, if the encapsulated object is an Email

getEmail

protected Email getEmail()
returns the encapsulated Email or null, if the encapsulated object is an MimeMessage.

Returns:
the encapsulated Email or null, if the encapsulated object is an MimeMessage

increaseFailCount

protected QueueItem increaseFailCount()
increases the number of sending failures by 1.

Returns:
the QueueItem

getFailCount

protected int getFailCount()
returns the number of sending failures.

Returns:
the number of sending failures