public class FileSystemMailQueue extends Object implements MailQueue
Modifier and Type | Field and Description |
---|---|
static String |
copyright |
protected File |
failedDirectory |
protected JAXBContext |
jaxbContext |
protected boolean |
keepSent |
protected static org.slf4j.Logger |
logger |
protected File |
queuedDirectory |
protected File |
sentDirectory |
Constructor and Description |
---|
FileSystemMailQueue(File directory) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkDirectories() |
protected void |
checkDirectory(File file) |
String |
enqueue(Email email) |
protected File |
getEmailAttachmentsDirectory(String emailId) |
protected File |
getEmailFile(String emailId) |
List<String> |
getEnqueuedEmailIds() |
File |
getFailedDirectory() |
File |
getQueuedDirectory() |
File |
getSentDirectory() |
boolean |
isKeepSent() |
Email |
loadEmail(String id) |
void |
markFailed(String id) |
void |
markSent(String id) |
void |
setKeepSent(boolean keepSent) |
public static final String copyright
protected final File queuedDirectory
protected final File sentDirectory
protected final File failedDirectory
protected final JAXBContext jaxbContext
protected boolean keepSent
protected static final org.slf4j.Logger logger
public FileSystemMailQueue(File directory)
protected void checkDirectory(File file) throws QueueException
QueueException
protected void checkDirectories() throws QueueException
QueueException
public String enqueue(Email email) throws QueueException
enqueue
in interface MailQueue
QueueException
public List<String> getEnqueuedEmailIds() throws QueueException
getEnqueuedEmailIds
in interface MailQueue
QueueException
public Email loadEmail(String id) throws QueueException
loadEmail
in interface MailQueue
QueueException
public void markSent(String id) throws QueueException
markSent
in interface MailQueue
QueueException
public void markFailed(String id) throws QueueException
markFailed
in interface MailQueue
QueueException
public File getQueuedDirectory()
public File getSentDirectory()
public File getFailedDirectory()
public boolean isKeepSent()
isKeepSent
in interface MailQueue
public void setKeepSent(boolean keepSent)
setKeepSent
in interface MailQueue