class MailCache extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MailCache.FetchMode |
Constructor and Description |
---|
MailCache(POP3MailBox mailbox,
String host,
int port,
String user,
String pass) |
Modifier and Type | Method and Description |
---|---|
void |
delete(Collection<String> uidls)
Mark mail for deletion locally.
|
void |
delete(String uidl)
Mark mail for deletion locally.
|
boolean |
getMail(MailCache.FetchMode mode)
Fetch any needed data from pop3 server.
|
Mail |
getMail(String uidl,
MailCache.FetchMode mode)
Fetch any needed data from pop3 server.
|
String[] |
getUIDLs()
The ones known locally, which will include any known on the server, if connected.
|
MailCache(POP3MailBox mailbox, String host, int port, String user, String pass)
mailbox
- non-nullpublic String[] getUIDLs()
public Mail getMail(String uidl, MailCache.FetchMode mode)
uidl
- message id to getmode
- CACHE_ONLY to not pull from pop serverpublic boolean getMail(MailCache.FetchMode mode)
mode
- HEADER or ALL onlypublic void delete(String uidl)
public void delete(Collection<String> uidls)