public class StoreClient
extends java.lang.Object
implements java.lang.AutoCloseable
Constructor and Description |
---|
StoreClient(ITagProducer tp,
java.lang.String hostname,
int port,
java.lang.String login,
java.lang.String password) |
StoreClient(ITagProducer tp,
java.lang.String hostname,
int port,
java.lang.String login,
java.lang.String password,
int timeoutSecs) |
StoreClient(java.lang.String hostname,
int port,
java.lang.String login,
java.lang.String password) |
StoreClient(java.lang.String hostname,
int port,
java.lang.String login,
java.lang.String password,
int timeoutSecs) |
Modifier and Type | Method and Description |
---|---|
int |
append(java.lang.String mailbox,
java.io.InputStream in,
FlagsList fl) |
int |
append(java.lang.String mailbox,
java.io.InputStream in,
FlagsList fl,
java.util.Date delivery) |
java.util.Set<java.lang.String> |
capabilities()
Issues the CAPABILITY command to the IMAP server
|
void |
close() |
boolean |
create(java.lang.String mailbox) |
boolean |
create(java.lang.String mailbox,
java.lang.String specialUse) |
CreateMailboxResult |
createMailbox(java.lang.String mailbox,
java.lang.String partition) |
boolean |
deleteAcl(java.lang.String mailbox,
java.lang.String consumer) |
boolean |
deleteAllConsumerAcls(java.lang.String consumer) |
CreateMailboxResult |
deleteMailbox(java.lang.String mailbox) |
boolean |
deleteMailboxAcl(java.lang.String mailbox,
java.lang.String consumer) |
CreateMailboxResult |
deleteMailboxHierarchy(java.lang.String mbox) |
boolean |
enable(java.lang.String capability,
java.lang.String... otherCapabilities)
Tells the server our client supports given capabilities, eg.
|
void |
expunge() |
AnnotationList |
getAnnotation(java.lang.String mailbox) |
AnnotationList |
getAnnotation(java.lang.String mailbox,
java.lang.String annotation) |
long |
getFirstUid() |
int |
getUidnext(java.lang.String mailbox) |
SyncStatus |
getUidValidity(java.lang.String mailbox) |
int |
getUnseen(java.lang.String mailbox) |
boolean |
isClosed() |
boolean |
isExist(java.lang.String mbox) |
boolean |
isExistAndSelectable(java.lang.String mbox) |
java.util.Map<java.lang.String,Acl> |
listAcl(java.lang.String mailbox) |
ListResult |
listAll() |
ListResult |
listAllDomain(java.lang.String virtDomain) |
ListResult |
listSubFoldersMailbox(java.lang.String mailbox) |
ListResult |
listSubscribed() |
boolean |
login()
Logs into the IMAP store.
|
boolean |
login(java.lang.Boolean activateTLS)
Logs into the IMAP store
|
void |
logout()
Logs out & disconnect from the IMAP server.
|
NameSpaceInfo |
namespace() |
boolean |
noop() |
QuotaInfo |
quota(java.lang.String mailbox) |
boolean |
rename(java.lang.String mailbox,
java.lang.String newMailbox) |
boolean |
select(java.lang.String mailbox)
Opens the given IMAP folder.
|
boolean |
setAcl(java.lang.String mailbox,
java.lang.String consumer,
Acl acl) |
boolean |
setMailboxAcl(java.lang.String mailbox,
java.lang.String consumer,
Acl acl) |
boolean |
setMailboxAnnotation(java.lang.String mailbox,
java.lang.String annotationId,
java.util.Map<java.lang.String,java.lang.String> keyValues) |
boolean |
setQuota(java.lang.String mailbox,
int quota) |
boolean |
subscribe(java.lang.String mailbox) |
MailboxChanges |
sync(java.lang.String mailbox,
SyncData sd)
Uses QRESYNC to fetch changes to a folder.
|
TaggedResult |
tagged(java.lang.String imapCommand) |
java.util.Map<java.lang.Integer,java.lang.Integer> |
uidCopy(java.util.Collection<java.lang.Integer> uids,
java.lang.String destMailbox) |
java.util.Map<java.lang.Integer,java.lang.Integer> |
uidCopy(java.lang.String uidSet,
java.lang.String destMailbox) |
void |
uidExpunge(java.util.Collection<java.lang.Integer> uids) |
java.util.Collection<MimeTree> |
uidFetchBodyStructure(java.util.Collection<java.lang.Integer> uids) |
java.util.Collection<Envelope> |
uidFetchEnvelope(java.util.Collection<java.lang.Integer> uids) |
java.util.Collection<FlagsList> |
uidFetchFlags(java.util.Collection<java.lang.Integer> uids) |
java.util.Collection<FlagsList> |
uidFetchFlags(java.lang.String uidSet) |
java.util.Collection<IMAPHeaders> |
uidFetchHeaders(java.util.Collection<java.lang.Integer> uids,
java.lang.String[] headers) |
InternalDate[] |
uidFetchInternalDate(java.util.Collection<java.lang.Integer> uids) |
InternalDate[] |
uidFetchInternalDate(java.lang.String uidSet) |
IMAPByteSource |
uidFetchMessage(java.lang.Integer uid) |
IMAPByteSource |
uidFetchPart(java.lang.Integer uid,
java.lang.String address) |
java.util.Collection<Summary> |
uidFetchSummary(java.lang.String uidSet) |
java.util.Collection<java.lang.Integer> |
uidSearch(SearchQuery sq) |
java.util.Collection<java.lang.Integer> |
uidSearchDeleted() |
boolean |
uidStore(java.util.Collection<java.lang.Integer> uids,
FlagsList fl,
boolean set) |
boolean |
uidStore(java.lang.String uidSet,
FlagsList fl,
boolean set) |
java.util.List<MailThread> |
uidThreads() |
boolean |
unsubscribe(java.lang.String mailbox) |
boolean |
xfer(java.lang.String boxName,
java.lang.String serverName,
java.lang.String partition)
Transfer a mailbox to a new backend using XFER command
|
public StoreClient(java.lang.String hostname, int port, java.lang.String login, java.lang.String password, int timeoutSecs)
public StoreClient(java.lang.String hostname, int port, java.lang.String login, java.lang.String password)
public StoreClient(ITagProducer tp, java.lang.String hostname, int port, java.lang.String login, java.lang.String password)
public StoreClient(ITagProducer tp, java.lang.String hostname, int port, java.lang.String login, java.lang.String password, int timeoutSecs)
public boolean login()
IMAPException
public boolean login(java.lang.Boolean activateTLS)
IMAPException
public void logout()
public boolean select(java.lang.String mailbox) throws IMAPException
mailbox
- utf8 mailbox name.IMAPException
public boolean create(java.lang.String mailbox) throws IMAPException
IMAPException
public boolean create(java.lang.String mailbox, java.lang.String specialUse)
public CreateMailboxResult createMailbox(java.lang.String mailbox, java.lang.String partition) throws IMAPException
IMAPException
public boolean setAcl(java.lang.String mailbox, java.lang.String consumer, Acl acl) throws IMAPException
IMAPException
public boolean setMailboxAcl(java.lang.String mailbox, java.lang.String consumer, Acl acl) throws IMAPException
IMAPException
public boolean deleteAcl(java.lang.String mailbox, java.lang.String consumer) throws IMAPException
IMAPException
public boolean deleteMailboxAcl(java.lang.String mailbox, java.lang.String consumer) throws IMAPException
IMAPException
public boolean deleteAllConsumerAcls(java.lang.String consumer) throws IMAPException
IMAPException
public java.util.Map<java.lang.String,Acl> listAcl(java.lang.String mailbox) throws IMAPException
IMAPException
public boolean subscribe(java.lang.String mailbox) throws IMAPException
IMAPException
public boolean unsubscribe(java.lang.String mailbox) throws IMAPException
IMAPException
public CreateMailboxResult deleteMailbox(java.lang.String mailbox) throws IMAPException
IMAPException
public CreateMailboxResult deleteMailboxHierarchy(java.lang.String mbox) throws IMAPException
IMAPException
public boolean rename(java.lang.String mailbox, java.lang.String newMailbox) throws IMAPException
IMAPException
public java.util.Set<java.lang.String> capabilities() throws IMAPException
IMAPException
public boolean noop()
public ListResult listSubscribed()
public ListResult listAll()
public ListResult listAllDomain(java.lang.String virtDomain)
public ListResult listSubFoldersMailbox(java.lang.String mailbox)
public int append(java.lang.String mailbox, java.io.InputStream in, FlagsList fl)
public int append(java.lang.String mailbox, java.io.InputStream in, FlagsList fl, java.util.Date delivery)
public TaggedResult tagged(java.lang.String imapCommand)
public void expunge()
public void uidExpunge(java.util.Collection<java.lang.Integer> uids)
public QuotaInfo quota(java.lang.String mailbox)
public boolean setQuota(java.lang.String mailbox, int quota)
mailbox
- user/admin@buffy.kvmquota
- unit is KB, 0 removes the quotapublic IMAPByteSource uidFetchMessage(java.lang.Integer uid)
public java.util.Collection<java.lang.Integer> uidSearch(SearchQuery sq)
public java.util.Collection<java.lang.Integer> uidSearchDeleted()
public java.util.Collection<MimeTree> uidFetchBodyStructure(java.util.Collection<java.lang.Integer> uids)
public java.util.Collection<IMAPHeaders> uidFetchHeaders(java.util.Collection<java.lang.Integer> uids, java.lang.String[] headers)
public java.util.Collection<Envelope> uidFetchEnvelope(java.util.Collection<java.lang.Integer> uids)
public java.util.Collection<FlagsList> uidFetchFlags(java.util.Collection<java.lang.Integer> uids)
public java.util.Collection<FlagsList> uidFetchFlags(java.lang.String uidSet)
public InternalDate[] uidFetchInternalDate(java.util.Collection<java.lang.Integer> uids)
public InternalDate[] uidFetchInternalDate(java.lang.String uidSet)
public java.util.Map<java.lang.Integer,java.lang.Integer> uidCopy(java.util.Collection<java.lang.Integer> uids, java.lang.String destMailbox)
public java.util.Map<java.lang.Integer,java.lang.Integer> uidCopy(java.lang.String uidSet, java.lang.String destMailbox)
public boolean uidStore(java.util.Collection<java.lang.Integer> uids, FlagsList fl, boolean set)
public boolean uidStore(java.lang.String uidSet, FlagsList fl, boolean set)
public IMAPByteSource uidFetchPart(java.lang.Integer uid, java.lang.String address)
public java.util.List<MailThread> uidThreads()
public NameSpaceInfo namespace()
public int getUnseen(java.lang.String mailbox)
public int getUidnext(java.lang.String mailbox)
public java.util.Collection<Summary> uidFetchSummary(java.lang.String uidSet)
public boolean xfer(java.lang.String boxName, java.lang.String serverName, java.lang.String partition)
boxName
- serverName
- public boolean setMailboxAnnotation(java.lang.String mailbox, java.lang.String annotationId, java.util.Map<java.lang.String,java.lang.String> keyValues)
public AnnotationList getAnnotation(java.lang.String mailbox)
public AnnotationList getAnnotation(java.lang.String mailbox, java.lang.String annotation)
public boolean enable(java.lang.String capability, java.lang.String... otherCapabilities)
capability
- otherCapabilities
- public SyncStatus getUidValidity(java.lang.String mailbox)
public long getFirstUid()
public MailboxChanges sync(java.lang.String mailbox, SyncData sd)
enable(String, String...)
must be called first with
QRESYNC capability.
The folder is selected by this command.mailbox
- sd
- public boolean isExist(java.lang.String mbox)
public boolean isExistAndSelectable(java.lang.String mbox)
public void close()
close
in interface java.lang.AutoCloseable
public boolean isClosed()
Copyright © 2021. All Rights Reserved.