com.ericdaugherty.mail.server.persistence.smtp
Class IncrementalFileIOProccessor
java.lang.Object
com.ericdaugherty.mail.server.persistence.smtp.IncrementalFileIOProccessor
- All Implemented Interfaces:
- SMTPMessagePersistenceProccessor
public final class IncrementalFileIOProccessor
- extends java.lang.Object
- implements SMTPMessagePersistenceProccessor
A file system based SMTP persistance processor.
- Author:
- Andreas Kyrmegalos
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IncrementalFileIOProccessor
public IncrementalFileIOProccessor()
setMessage
public void setMessage(SMTPMessage message)
- Specified by:
setMessage
in interface SMTPMessagePersistenceProccessor
getPersistedID
public java.lang.Object getPersistedID()
- Specified by:
getPersistedID
in interface SMTPMessagePersistenceProccessor
getMessageLocation
public java.io.File getMessageLocation()
- Returns:
- the messageLocation
setMessageLocation
public void setMessageLocation(java.io.File messageLocation)
- Parameters:
messageLocation
- the messageLocation to set
initializeMessage
public void initializeMessage(java.lang.String filename,
boolean headersOnly)
throws java.io.IOException
- Specified by:
initializeMessage
in interface SMTPMessagePersistenceProccessor
- Throws:
java.io.IOException
getSize
public long getSize()
- Specified by:
getSize
in interface SMTPMessagePersistenceProccessor
addDataLine
public void addDataLine(byte[] line)
- Specified by:
addDataLine
in interface SMTPMessagePersistenceProccessor
save
public void save(boolean useAmavisSMTPDirectory)
throws java.io.IOException
- Saves the message to the Mail Spool Directory. Used when rescheduling.
- Specified by:
save
in interface SMTPMessagePersistenceProccessor
- Throws:
java.io.IOException
saveBegin
public boolean saveBegin(boolean useAmavisSMTPDirectory)
- Specified by:
saveBegin
in interface SMTPMessagePersistenceProccessor
saveIncrement
public void saveIncrement(java.util.List<byte[]> dataLines,
boolean writeHeaders,
boolean append)
throws java.io.IOException
- Specified by:
saveIncrement
in interface SMTPMessagePersistenceProccessor
- Throws:
java.io.IOException
saveFinish
public boolean saveFinish()
- Specified by:
saveFinish
in interface SMTPMessagePersistenceProccessor
loadIncrementally
public java.util.List loadIncrementally(int start)
throws java.io.IOException
- Specified by:
loadIncrementally
in interface SMTPMessagePersistenceProccessor
- Throws:
java.io.IOException
loadIncrementally
public final java.util.List loadIncrementally(int start,
java.lang.String messageName)
throws java.io.IOException
- Specified by:
loadIncrementally
in interface SMTPMessagePersistenceProccessor
- Throws:
java.io.IOException
moveToFailedFolder
public void moveToFailedFolder()
throws java.lang.Exception
- Moves the message to the 'failed' Directory.
- Specified by:
moveToFailedFolder
in interface SMTPMessagePersistenceProccessor
- Throws:
java.lang.Exception
isNotSavedInAmavis
public boolean isNotSavedInAmavis()
- Specified by:
isNotSavedInAmavis
in interface SMTPMessagePersistenceProccessor
getPersistedSize
public long getPersistedSize()
- Specified by:
getPersistedSize
in interface SMTPMessagePersistenceProccessor
deleteMessage
public boolean deleteMessage()
- Specified by:
deleteMessage
in interface SMTPMessagePersistenceProccessor
redirectToPostmaster
public void redirectToPostmaster()
throws java.io.IOException
- Specified by:
redirectToPostmaster
in interface SMTPMessagePersistenceProccessor
- Throws:
java.io.IOException