com.ericdaugherty.mail.server.persistence
Interface SMTPMessagePersistenceProccessor

All Known Implementing Classes:
IncrementalFileIOProccessor

public interface SMTPMessagePersistenceProccessor

A SMTP persistance processor interface.

Author:
Andreas Kyrmegalos

Method Summary
 void addDataLine(byte[] line)
           
 boolean deleteMessage()
           
 java.lang.Object getPersistedID()
           
 long getPersistedSize()
           
 long getSize()
           
 void initializeMessage(java.lang.String filename, boolean headersOnly)
           
 boolean isNotSavedInAmavis()
           
 java.util.List loadIncrementally(int start)
           
 java.util.List loadIncrementally(int start, java.lang.String messageName)
           
 void moveToFailedFolder()
           
 void redirectToPostmaster()
           
 void save(boolean useAmavisSMTPDirectory)
           
 boolean saveBegin(boolean useAmavisSMTPDirectory)
           
 boolean saveFinish()
           
 void saveIncrement(java.util.List<byte[]> dataLines, boolean writeHeaders, boolean append)
           
 void setMessage(SMTPMessage message)
           
 

Method Detail

setMessage

void setMessage(SMTPMessage message)

initializeMessage

void initializeMessage(java.lang.String filename,
                       boolean headersOnly)
                       throws java.io.IOException
Throws:
java.io.IOException

getSize

long getSize()

addDataLine

void addDataLine(byte[] line)

save

void save(boolean useAmavisSMTPDirectory)
          throws java.io.IOException
Throws:
java.io.IOException

saveBegin

boolean saveBegin(boolean useAmavisSMTPDirectory)

saveIncrement

void saveIncrement(java.util.List<byte[]> dataLines,
                   boolean writeHeaders,
                   boolean append)
                   throws java.io.IOException
Throws:
java.io.IOException

saveFinish

boolean saveFinish()

loadIncrementally

java.util.List loadIncrementally(int start)
                                 throws java.io.IOException
Throws:
java.io.IOException

loadIncrementally

java.util.List loadIncrementally(int start,
                                 java.lang.String messageName)
                                 throws java.io.IOException
Throws:
java.io.IOException

moveToFailedFolder

void moveToFailedFolder()
                        throws java.lang.Exception
Throws:
java.lang.Exception

isNotSavedInAmavis

boolean isNotSavedInAmavis()

getPersistedSize

long getPersistedSize()

getPersistedID

java.lang.Object getPersistedID()

deleteMessage

boolean deleteMessage()

redirectToPostmaster

void redirectToPostmaster()
                          throws java.io.IOException
Throws:
java.io.IOException