public class GmailProtocol extends IMAPProtocol
Modifier and Type | Field and Description |
---|---|
private FetchItem[] |
fetchItems |
static FetchItem |
LABELS_ITEM |
static FetchItem |
MSGID_ITEM |
private static FetchItem[] |
myFetchItems |
static FetchItem |
THRID_ITEM |
enabled, searchCharsets, searchSequence
Constructor and Description |
---|
GmailProtocol(java.lang.String name,
java.lang.String host,
int port,
java.util.Properties props,
boolean isSSL,
MailLogger logger)
Connect to Gmail.
|
Modifier and Type | Method and Description |
---|---|
private Argument |
createLabelList(java.lang.String[] labels) |
FetchItem[] |
getFetchItems()
Return the additional fetch items supported by the Gmail protocol.
|
protected SearchSequence |
getSearchSequence()
Return a GmailSearchSequence.
|
void |
storeLabels(int start,
int end,
java.lang.String[] labels,
boolean set)
Set the specified labels on this message.
|
void |
storeLabels(int msg,
java.lang.String[] labels,
boolean set)
Set the specified labels on this message.
|
void |
storeLabels(MessageSet[] msgsets,
java.lang.String[] labels,
boolean set)
Set the specified labels on this message.
|
private void |
storeLabels(java.lang.String msgset,
java.lang.String[] labels,
boolean set) |
append, appenduid, appenduid, authlogin, authntlm, authoauth2, authplain, capability, check, close, compress, copy, copy, copyuid, copyuid, create, createFlagList, delete, deleteACL, disconnect, doList, enable, examine, examine, expunge, fetch, fetch, fetch, fetchBody, fetchBody, fetchBody, fetchBody, fetchBody, fetchBodyStructure, fetchFlags, fetchMODSEQ, fetchRFC822, fetchSectionBody, fetchSequenceNumber, fetchSequenceNumbers, fetchSequenceNumbers, fetchUID, getACL, getCapabilities, getCopyUID, getProxyAuthUser, getQuota, getQuotaRoot, getResponseBuffer, handleCapabilityResponse, handleLoginResult, hasCapability, id, id, idleAbort, idleStart, isAuthenticated, isEnabled, isREV1, list, listRights, login, logout, lsub, move, move, moveuid, moveuid, myRights, namespace, noop, parseCapabilities, peekBody, peekBody, peekBody, processGreeting, processIdleResponse, proxyauth, readIdleResponse, readResponse, rename, sasllogin, search, search, select, select, setACL, setCapabilities, setQuota, sort, startTLS, status, storeFlags, storeFlags, storeFlags, subscribe, supportsNonSyncLiterals, supportsUtf8, uidexpunge, uidfetchChangedSince, unauthenticate, unselect, unsubscribe, writeMailboxName
addResponseHandler, command, finalize, getChannel, getInetAddress, getInputStream, getLocalHost, getOutputStream, getTimestamp, handleResult, hasResponse, isSSL, isTracing, notifyResponseHandlers, removeResponseHandler, resumeTracing, simpleCommand, startCompression, startTLS, suspendTracing, writeCommand
public static final FetchItem MSGID_ITEM
public static final FetchItem THRID_ITEM
public static final FetchItem LABELS_ITEM
private static final FetchItem[] myFetchItems
private FetchItem[] fetchItems
public GmailProtocol(java.lang.String name, java.lang.String host, int port, java.util.Properties props, boolean isSSL, MailLogger logger) throws java.io.IOException, ProtocolException
name
- the protocol namehost
- host to connect toport
- portnumber to connect toprops
- Properties object used by this protocolisSSL
- use SSL?logger
- for log messagesjava.io.IOException
- for I/O errorsProtocolException
- for protocol failurespublic FetchItem[] getFetchItems()
getFetchItems
in class IMAPProtocol
public void storeLabels(MessageSet[] msgsets, java.lang.String[] labels, boolean set) throws ProtocolException
msgsets
- the message setslabels
- the labelsset
- true to set, false to clearProtocolException
- for protocol failurespublic void storeLabels(int start, int end, java.lang.String[] labels, boolean set) throws ProtocolException
start
- the first message numberend
- the last message numberlabels
- the labelsset
- true to set, false to clearProtocolException
- for protocol failurespublic void storeLabels(int msg, java.lang.String[] labels, boolean set) throws ProtocolException
msg
- the message numberlabels
- the labelsset
- true to set, false to clearProtocolException
- for protocol failuresprivate void storeLabels(java.lang.String msgset, java.lang.String[] labels, boolean set) throws ProtocolException
ProtocolException
private Argument createLabelList(java.lang.String[] labels)
protected SearchSequence getSearchSequence()
getSearchSequence
in class IMAPProtocol