Package mireka.pop.store
Interface MaildropAppender
-
public interface MaildropAppenderA @{code MaildropAppender} is used to add a new mail to a maildrop. It works even if the maildrop is currently locked.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcommit()It closes the output stream, adds the mail to the maildrop and releases the appender.java.io.OutputStreamgetOutputStream()Returns an output stream into which the mail must be written.voidrollback()It closes the output stream if it is open, removes any temporary files and releases the appender.
-
-
-
Method Detail
-
getOutputStream
java.io.OutputStream getOutputStream() throws LocalMailSystemExceptionReturns an output stream into which the mail must be written. Eithercommit()orrollback()must be called later to close this stream.- Throws:
LocalMailSystemException
-
commit
void commit() throws LocalMailSystemExceptionIt closes the output stream, adds the mail to the maildrop and releases the appender. Even if it throws an exception, the appender is always released.- Throws:
LocalMailSystemException- if the mail couldn't be added to the maildrop for some reason.
-
rollback
void rollback()
It closes the output stream if it is open, removes any temporary files and releases the appender. It does not add the mail to the maildrop.
-
-