class MailCache extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
MailCache.FetchMode |
| Constructor | Description |
|---|---|
MailCache(I2PAppContext ctx,
POP3MailBox mailbox,
String host,
int port,
String user,
String pass) |
Does NOT load the mails in.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
delete(String uidl) |
Mark mail for deletion locally.
|
void |
delete(Collection<String> uidls) |
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, unless mode is CACHE_ONLY.
|
String[] |
getUIDLs() |
The ones known locally, which will include any known on the server, if connected.
|
boolean |
loadFromDisk(NewMailListener nml) |
Threaded.
|
MailCache(I2PAppContext ctx, POP3MailBox mailbox, String host, int port, String user, String pass) throws IOException
mailbox - non-nullIOExceptionpublic boolean loadFromDisk(NewMailListener nml)
public 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)