Package com.sun.mail.gimap.protocol
Class GmailProtocol
java.lang.Object
com.sun.mail.iap.Protocol
com.sun.mail.imap.protocol.IMAPProtocol
com.sun.mail.gimap.protocol.GmailProtocol
Extend IMAP support to handle Gmail-specific protocol extensions.
- Since:
- JavaMail 1.4.6
- Author:
- Bill Shannon
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FetchItem
static final FetchItem
static final FetchItem
Fields inherited from class com.sun.mail.imap.protocol.IMAPProtocol
enabled, searchCharsets, searchSequence
-
Constructor Summary
ConstructorsConstructorDescriptionGmailProtocol
(String name, String host, int port, Properties props, boolean isSSL, MailLogger logger) Connect to Gmail. -
Method Summary
Modifier and TypeMethodDescriptionReturn the additional fetch items supported by the Gmail protocol.protected SearchSequence
Return a GmailSearchSequence.void
storeLabels
(int start, int end, String[] labels, boolean set) Set the specified labels on this message.void
storeLabels
(int msg, String[] labels, boolean set) Set the specified labels on this message.void
storeLabels
(MessageSet[] msgsets, String[] labels, boolean set) Set the specified labels on this message.Methods inherited from class com.sun.mail.imap.protocol.IMAPProtocol
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
Methods inherited from class com.sun.mail.iap.Protocol
addResponseHandler, command, finalize, getChannel, getInetAddress, getInputStream, getLocalHost, getLocalSocketAddress, getOutputStream, getTimestamp, handleResult, hasResponse, isSSL, isTracing, notifyResponseHandlers, removeResponseHandler, resumeTracing, simpleCommand, startCompression, startTLS, suspendTracing, writeCommand
-
Field Details
-
MSGID_ITEM
-
THRID_ITEM
-
LABELS_ITEM
-
-
Constructor Details
-
GmailProtocol
public GmailProtocol(String name, String host, int port, Properties props, boolean isSSL, MailLogger logger) throws IOException, ProtocolException Connect to Gmail.- Parameters:
name
- the protocol namehost
- host to connect toport
- portnumber to connect toprops
- Properties object used by this protocolisSSL
- use SSL?logger
- for log messages- Throws:
IOException
- for I/O errorsProtocolException
- for protocol failures
-
-
Method Details
-
getFetchItems
Return the additional fetch items supported by the Gmail protocol. Combines our fetch items with those supported by the superclass.- Overrides:
getFetchItems
in classIMAPProtocol
- Returns:
- an array of FetchItem objects
-
storeLabels
public void storeLabels(MessageSet[] msgsets, String[] labels, boolean set) throws ProtocolException Set the specified labels on this message.- Parameters:
msgsets
- the message setslabels
- the labelsset
- true to set, false to clear- Throws:
ProtocolException
- for protocol failures- Since:
- JavaMail 1.5.5
-
storeLabels
Set the specified labels on this message.- Parameters:
start
- the first message numberend
- the last message numberlabels
- the labelsset
- true to set, false to clear- Throws:
ProtocolException
- for protocol failures- Since:
- JavaMail 1.5.5
-
storeLabels
Set the specified labels on this message.- Parameters:
msg
- the message numberlabels
- the labelsset
- true to set, false to clear- Throws:
ProtocolException
- for protocol failures- Since:
- JavaMail 1.5.5
-
getSearchSequence
Return a GmailSearchSequence.- Overrides:
getSearchSequence
in classIMAPProtocol
- Returns:
- the SearchSequence
-