com.ericdaugherty.mail.server.services.smtp
Class SMTPMessageImpl
java.lang.Object
com.ericdaugherty.mail.server.services.smtp.SMTPMessageImpl
- All Implemented Interfaces:
- SMTPMessage
public class SMTPMessageImpl
- extends java.lang.Object
- implements SMTPMessage
A class representing an instance of a JES SMTP Message.
- Author:
- Andreas Kyrmegalos
Constructor Summary |
SMTPMessageImpl()
Instantiates a new message with the current time. |
SMTPMessageImpl(java.lang.String messagePersistanceName,
boolean headersOnly)
Instantiates a message using a stored file. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
SMTPMessageImpl
public SMTPMessageImpl()
- Instantiates a new message with the current time.
SMTPMessageImpl
public SMTPMessageImpl(java.lang.String messagePersistanceName,
boolean headersOnly)
throws java.io.IOException
- Instantiates a message using a stored file.
- Throws:
java.io.IOException
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class java.lang.Object
getTimeReceived
public java.util.Date getTimeReceived()
- Specified by:
getTimeReceived
in interface SMTPMessage
setTimeReceived
public void setTimeReceived(java.util.Date timeReceived)
- Specified by:
setTimeReceived
in interface SMTPMessage
getScheduledDelivery
public java.util.Date getScheduledDelivery()
- Specified by:
getScheduledDelivery
in interface SMTPMessage
setScheduledDelivery
public void setScheduledDelivery(java.util.Date scheduledDelivery)
- Specified by:
setScheduledDelivery
in interface SMTPMessage
getDeliveryAttempts
public int getDeliveryAttempts()
- Specified by:
getDeliveryAttempts
in interface SMTPMessage
setDeliveryAttempts
public void setDeliveryAttempts(int deliveryAttempts)
- Specified by:
setDeliveryAttempts
in interface SMTPMessage
getFromAddress
public EmailAddress getFromAddress()
- Specified by:
getFromAddress
in interface SMTPMessage
setFromAddress
public void setFromAddress(EmailAddress fromAddress)
- Specified by:
setFromAddress
in interface SMTPMessage
getToAddresses
public java.util.List getToAddresses()
- Specified by:
getToAddresses
in interface SMTPMessage
setToAddresses
public void setToAddresses(java.util.List toAddresses)
- Specified by:
setToAddresses
in interface SMTPMessage
addToAddress
public void addToAddress(EmailAddress toAddress)
- Specified by:
addToAddress
in interface SMTPMessage
is8bitMIME
public boolean is8bitMIME()
- Specified by:
is8bitMIME
in interface SMTPMessage
set8bitMIME
public void set8bitMIME(boolean mime8bit)
- Specified by:
set8bitMIME
in interface SMTPMessage
getDataLines
public java.util.List<byte[]> getDataLines()
- Specified by:
getDataLines
in interface SMTPMessage
addDataLine
public void addDataLine(byte[] line)
- Specified by:
addDataLine
in interface SMTPMessage
setSMTPUID
public final void setSMTPUID(java.lang.String smtpUID)
- Specified by:
setSMTPUID
in interface SMTPMessage
incrementSize
public void incrementSize(long increment)
- Specified by:
incrementSize
in interface SMTPMessage
getSize
public long getSize()
- Specified by:
getSize
in interface SMTPMessage
getSMTPUID
public java.lang.String getSMTPUID()
- Specified by:
getSMTPUID
in interface SMTPMessage
getSMTPPersistenceProccessor
public SMTPMessagePersistenceProccessor getSMTPPersistenceProccessor()
- Specified by:
getSMTPPersistenceProccessor
in interface SMTPMessage
- Returns:
- the SMTPMessagePersistenceProccessor