public class IMAPSession extends NativeObject
Constructor and Description |
---|
IMAPSession()
Constructor for the IMAPSession.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsFolderConcurrentAccessEnabled()
Returns whether the IMAP session can access folders using several IMAP connections.
|
IMAPAppendMessageOperation |
appendMessageOperation(java.lang.String folder,
byte[] messageData,
int messageFlags)
Returns an operation to append a message to a folder.
|
IMAPAppendMessageOperation |
appendMessageOperation(java.lang.String folder,
byte[] messageData,
int messageFlags,
java.util.List<java.lang.String> customFlags)
Returns an operation to append a message to a folder.
|
int |
authType()
Returns authentication type.
|
void |
cancelAllOperations()
Cancels all queued operations.
|
IMAPCapabilityOperation |
capabilityOperation()
Returns an operation to fetch the capabilities.
|
IMAPOperation |
checkAccountOperation()
Returns an operation to check whether the credentials of the account are correct.
|
IMAPIdentity |
clientIdentity()
Returns client identity.
|
ConnectionLogger |
connectionLogger()
Returns the connection logger.
|
int |
connectionType()
Returns connection type (clear-text, SSL or STARTTLS).
|
IMAPOperation |
connectOperation()
Returns an operation to connect to the server.
|
IMAPCopyMessagesOperation |
copyMessagesOperation(java.lang.String folder,
IndexSet uids,
java.lang.String destFolder)
Returns an operation to copy messages to a folder.
|
IMAPOperation |
createFolderOperation(java.lang.String folder)
Returns an operation to create a folder.
|
IMAPNamespace |
defaultNamespace()
Returns the default namespace.
|
IMAPOperation |
deleteFolderOperation(java.lang.String folder)
Returns an operation to delete a folder.
|
IMAPOperation |
disconnectOperation()
Returns an operation to disconnect from the server.
|
IMAPOperation |
expungeOperation(java.lang.String folder)
Returns an operation to expunge messages after they've been marked as deleted.
|
IMAPFetchFoldersOperation |
fetchAllFoldersOperation()
Returns an operation to request the list of all folders.
|
IMAPFetchContentOperation |
fetchMessageAttachmentByNumberOperation(java.lang.String folder,
long number,
java.lang.String partID,
int encoding)
Returns an operation to fetch an attachment content using the sequence number of a message.
|
IMAPFetchContentOperation |
fetchMessageAttachmentByNumberOperation(java.lang.String folder,
long number,
java.lang.String partID,
int encoding,
boolean urgent)
Returns an operation to fetch an attachment content using the sequence number of a message.
|
IMAPFetchContentOperation |
fetchMessageAttachmentByUIDOperation(java.lang.String folder,
long uid,
java.lang.String partID,
int encoding)
Returns an operation to fetch an attachment content using the UID of a message.
|
IMAPFetchContentOperation |
fetchMessageAttachmentByUIDOperation(java.lang.String folder,
long uid,
java.lang.String partID,
int encoding,
boolean urgent)
Returns an operation to fetch an attachment content using the UID of a message.
|
IMAPFetchContentOperation |
fetchMessageByNumberOperation(java.lang.String folder,
long number)
Returns an operation to fetch a message content by sequence number.
|
IMAPFetchContentOperation |
fetchMessageByNumberOperation(java.lang.String folder,
long number,
boolean urgent)
Returns an operation to fetch a message content by sequence number.
|
IMAPFetchContentOperation |
fetchMessageByUIDOperation(java.lang.String folder,
long uid)
Returns an operation to fetch a message content by UID.
|
IMAPFetchContentOperation |
fetchMessageByUIDOperation(java.lang.String folder,
long uid,
boolean urgent)
Returns an operation to fetch a message content by UID.
|
IMAPFetchMessagesOperation |
fetchMessagesByNumberOperation(java.lang.String folder,
int requestKind,
IndexSet indexes)
Returns an operation to fetch a list of messages by sequence number.
|
IMAPFetchMessagesOperation |
fetchMessagesByUIDOperation(java.lang.String folder,
int requestKind,
IndexSet indexes)
Returns an operation to fetch a list of messages by UID.
|
IMAPFetchNamespaceOperation |
fetchNamespaceOperation()
Returns an operation to fetch the namespace.
|
IMAPFetchParsedContentOperation |
fetchParsedMessageByNumberOperation(java.lang.String folder,
long number)
Returns an operation to fetch a message content by sequence number and parse it.
|
IMAPFetchParsedContentOperation |
fetchParsedMessageByNumberOperation(java.lang.String folder,
long number,
boolean urgent)
Returns an operation to fetch a message content by sequence number and parse it.
|
IMAPFetchParsedContentOperation |
fetchParsedMessageByUIDOperation(java.lang.String folder,
long uid)
Returns an operation to fetch a message content by UID and parse it.
|
IMAPFetchParsedContentOperation |
fetchParsedMessageByUIDOperation(java.lang.String folder,
long uid,
boolean urgent)
Returns an operation to fetch a message content by UID and parse it.
|
IMAPFetchFoldersOperation |
fetchSubscribedFoldersOperation()
Returns an operation to request the list of subscribed folders.
|
protected void |
finalize() |
IMAPFolderInfoOperation |
folderInfoOperation(java.lang.String folder)
Returns an operation to request the folder info.
|
IMAPFolderStatusOperation |
folderStatusOperation(java.lang.String folder)
Returns an operation to request the folder status.
|
java.lang.String |
gmailUserDisplayName()
Returns the Gmail user display name.
|
java.lang.String |
hostname()
Returns the IMAP server hostname.
|
IMAPMessageRenderingOperation |
htmlBodyRenderingOperation(IMAPMessage message,
java.lang.String folder)
Returns an operation to render the body of a message as HTML.
|
IMAPMessageRenderingOperation |
htmlRenderingOperation(IMAPMessage message,
java.lang.String folder)
Returns an operation to render a message as HTML.
|
IMAPIdentityOperation |
identityOperation(IMAPIdentity identity)
Returns an operation to send to the server the identity of the client and to get the identity of
the server.
|
IMAPIdleOperation |
idleOperation(java.lang.String folder,
long lastKnownUID)
Returns an IDLE operation (wait for a new message).
|
boolean |
isCheckCertificateEnabled()
Returns whether the certificate of the server should be checked.
|
boolean |
isOperationQueueRunning()
Returns whether the operation queue is running.
|
int |
maximumConnections()
Returns the maximum number of IMAP connections to use.
|
IMAPOperation |
noopOperation()
Returns an IMAP NOOP operation.
|
java.lang.String |
OAuth2Token()
Returns the OAuth2 token.
|
OperationQueueListener |
operationQueueListener()
Returns the IMAP operations queue listener.
|
java.lang.String |
password()
Returns the password.
|
IMAPMessageRenderingOperation |
plainTextBodyRenderingOperation(IMAPMessage message,
java.lang.String folder,
boolean stripWhitespace)
Returns an operation to render the body of a message as text.
|
IMAPMessageRenderingOperation |
plainTextRenderingOperation(IMAPMessage message,
java.lang.String folder)
Returns an operation to render a message as text.
|
int |
port()
Returns the port.
|
IMAPQuotaOperation |
quotaOperation()
Returns an operation to fetch the quota information.
|
IMAPOperation |
renameFolderOperation(java.lang.String folder,
java.lang.String otherName)
Returns an operation to rename a folder.
|
IMAPSearchOperation |
searchOperation(java.lang.String folder,
IMAPSearchExpression expression)
Returns a search operation using an expression.
|
IMAPSearchOperation |
searchOperation(java.lang.String folder,
int kind,
java.lang.String searchString)
Returns a simple search operation.
|
IMAPIdentity |
serverIdentity()
Returns server identity.
|
void |
setAllowsFolderConcurrentAccessEnabled(boolean enabled)
Set whether the IMAP session can access folders using several IMAP connections.
|
void |
setAuthType(int authType)
Sets the authentication type.
|
void |
setCheckCertificateEnabled(boolean enabled)
Sets whether the certificate of the server should be checked.
|
void |
setConnectionLogger(ConnectionLogger logger)
Sets the connection logger.
|
void |
setConnectionType(int connectionType)
Set connection type (clear-text, SSL or STARTTLS).
|
void |
setDefaultNamespace(IMAPNamespace ns)
Sets the default namespace.
|
void |
setHostname(java.lang.String hostname)
Sets the IMAP server hostname.
|
void |
setMaximumConnections(int maxConnections)
Sets the maximum number of IMAP connections to use.
|
void |
setOAuth2Token(java.lang.String token)
Sets the OAuth2 token.
|
void |
setOperationQueueListener(OperationQueueListener listener)
Sets the IMAP operations queue listener.
|
void |
setPassword(java.lang.String password)
Sets the password.
|
void |
setPort(int port)
Sets the port.
|
void |
setTimeout(long seconds)
Sets network timeout in seconds.
|
void |
setUsername(java.lang.String username)
Sets the username.
|
IMAPOperation |
storeFlagsByNumberOperation(java.lang.String folder,
IndexSet numbers,
int kind,
int flags)
Returns an operation to store flags to a set of messages designated by sequence numbers.
|
IMAPOperation |
storeFlagsByNumberOperation(java.lang.String folder,
IndexSet numbers,
int kind,
int flags,
java.util.List<java.lang.String> customFlags)
Returns an operation to store flags to a set of messages designated by sequence numbers.
|
IMAPOperation |
storeFlagsByUIDOperation(java.lang.String folder,
IndexSet uids,
int kind,
int flags)
Returns an operation to store flags to a set of messages designated by UIDs.
|
IMAPOperation |
storeFlagsByUIDOperation(java.lang.String folder,
IndexSet uids,
int kind,
int flags,
java.util.List<java.lang.String> customFlags)
Returns an operation to store flags to a set of messages designated by UIDs.
|
IMAPOperation |
storeLabelsByNumberOperation(java.lang.String folder,
IndexSet numbers,
int kind,
java.util.List<java.lang.String> labels)
Returns an operation to store labels to a set of messages designated by sequence numbers.
|
IMAPOperation |
storeLabelsByUIDOperation(java.lang.String folder,
IndexSet uids,
int kind,
java.util.List<java.lang.String> labels)
Returns an operation to store labels to a set of messages designated by UIDs.
|
IMAPOperation |
subscribeFolderOperation(java.lang.String folder)
Returns an operation to subscribe a folder.
|
IMAPFetchMessagesOperation |
syncMessagesByUIDOperation(java.lang.String folder,
int requestKind,
IndexSet indexes,
long modSeq)
Returns an operation to sync a list of messages.
|
long |
timeout()
Returns network timeout in seconds.
|
IMAPOperation |
unsubscribeFolderOperation(java.lang.String folder)
Returns an operation to unsubscribe a folder.
|
java.lang.String |
username()
Returns the username.
|
clone, initWithNative, readObject, toString, writeObject
protected void finalize() throws java.lang.Throwable
finalize
in class NativeObject
java.lang.Throwable
public void setHostname(java.lang.String hostname)
public java.lang.String hostname()
public void setPort(int port)
public int port()
public void setUsername(java.lang.String username)
public java.lang.String username()
public void setPassword(java.lang.String password)
public java.lang.String password()
public void setOAuth2Token(java.lang.String token)
public java.lang.String OAuth2Token()
public void setAuthType(int authType)
AuthType
public int authType()
AuthType
public void setConnectionType(int connectionType)
ConnectionType
public int connectionType()
ConnectionType
public void setTimeout(long seconds)
public long timeout()
public void setCheckCertificateEnabled(boolean enabled)
public boolean isCheckCertificateEnabled()
public void setDefaultNamespace(IMAPNamespace ns)
public IMAPNamespace defaultNamespace()
public void setAllowsFolderConcurrentAccessEnabled(boolean enabled)
public boolean allowsFolderConcurrentAccessEnabled()
public void setMaximumConnections(int maxConnections)
public int maximumConnections()
public void setConnectionLogger(ConnectionLogger logger)
public ConnectionLogger connectionLogger()
public void setOperationQueueListener(OperationQueueListener listener)
public OperationQueueListener operationQueueListener()
public boolean isOperationQueueRunning()
public void cancelAllOperations()
public IMAPIdentity serverIdentity()
public IMAPIdentity clientIdentity()
public java.lang.String gmailUserDisplayName()
public IMAPFolderInfoOperation folderInfoOperation(java.lang.String folder)
public IMAPFolderStatusOperation folderStatusOperation(java.lang.String folder)
public IMAPFetchFoldersOperation fetchSubscribedFoldersOperation()
public IMAPFetchFoldersOperation fetchAllFoldersOperation()
public IMAPOperation renameFolderOperation(java.lang.String folder, java.lang.String otherName)
public IMAPOperation deleteFolderOperation(java.lang.String folder)
public IMAPOperation createFolderOperation(java.lang.String folder)
public IMAPOperation subscribeFolderOperation(java.lang.String folder)
public IMAPOperation unsubscribeFolderOperation(java.lang.String folder)
public IMAPAppendMessageOperation appendMessageOperation(java.lang.String folder, byte[] messageData, int messageFlags, java.util.List<java.lang.String> customFlags)
public IMAPAppendMessageOperation appendMessageOperation(java.lang.String folder, byte[] messageData, int messageFlags)
public IMAPCopyMessagesOperation copyMessagesOperation(java.lang.String folder, IndexSet uids, java.lang.String destFolder)
public IMAPOperation expungeOperation(java.lang.String folder)
public IMAPFetchMessagesOperation fetchMessagesByUIDOperation(java.lang.String folder, int requestKind, IndexSet indexes)
public IMAPFetchMessagesOperation fetchMessagesByNumberOperation(java.lang.String folder, int requestKind, IndexSet indexes)
public IMAPFetchMessagesOperation syncMessagesByUIDOperation(java.lang.String folder, int requestKind, IndexSet indexes, long modSeq)
public IMAPFetchContentOperation fetchMessageByUIDOperation(java.lang.String folder, long uid, boolean urgent)
public IMAPFetchContentOperation fetchMessageByUIDOperation(java.lang.String folder, long uid)
public IMAPFetchContentOperation fetchMessageAttachmentByUIDOperation(java.lang.String folder, long uid, java.lang.String partID, int encoding, boolean urgent)
public IMAPFetchContentOperation fetchMessageAttachmentByUIDOperation(java.lang.String folder, long uid, java.lang.String partID, int encoding)
public IMAPFetchContentOperation fetchMessageByNumberOperation(java.lang.String folder, long number, boolean urgent)
public IMAPFetchContentOperation fetchMessageByNumberOperation(java.lang.String folder, long number)
public IMAPFetchContentOperation fetchMessageAttachmentByNumberOperation(java.lang.String folder, long number, java.lang.String partID, int encoding, boolean urgent)
public IMAPFetchContentOperation fetchMessageAttachmentByNumberOperation(java.lang.String folder, long number, java.lang.String partID, int encoding)
public IMAPFetchParsedContentOperation fetchParsedMessageByUIDOperation(java.lang.String folder, long uid, boolean urgent)
public IMAPFetchParsedContentOperation fetchParsedMessageByUIDOperation(java.lang.String folder, long uid)
public IMAPFetchParsedContentOperation fetchParsedMessageByNumberOperation(java.lang.String folder, long number, boolean urgent)
public IMAPFetchParsedContentOperation fetchParsedMessageByNumberOperation(java.lang.String folder, long number)
public IMAPOperation storeFlagsByUIDOperation(java.lang.String folder, IndexSet uids, int kind, int flags, java.util.List<java.lang.String> customFlags)
public IMAPOperation storeFlagsByUIDOperation(java.lang.String folder, IndexSet uids, int kind, int flags)
public IMAPOperation storeFlagsByNumberOperation(java.lang.String folder, IndexSet numbers, int kind, int flags, java.util.List<java.lang.String> customFlags)
public IMAPOperation storeFlagsByNumberOperation(java.lang.String folder, IndexSet numbers, int kind, int flags)
public IMAPOperation storeLabelsByUIDOperation(java.lang.String folder, IndexSet uids, int kind, java.util.List<java.lang.String> labels)
public IMAPOperation storeLabelsByNumberOperation(java.lang.String folder, IndexSet numbers, int kind, java.util.List<java.lang.String> labels)
public IMAPSearchOperation searchOperation(java.lang.String folder, int kind, java.lang.String searchString)
public IMAPSearchOperation searchOperation(java.lang.String folder, IMAPSearchExpression expression)
public IMAPIdleOperation idleOperation(java.lang.String folder, long lastKnownUID)
public IMAPFetchNamespaceOperation fetchNamespaceOperation()
public IMAPIdentityOperation identityOperation(IMAPIdentity identity)
public IMAPOperation connectOperation()
public IMAPOperation checkAccountOperation()
public IMAPOperation disconnectOperation()
public IMAPCapabilityOperation capabilityOperation()
public IMAPQuotaOperation quotaOperation()
public IMAPOperation noopOperation()
public IMAPMessageRenderingOperation htmlRenderingOperation(IMAPMessage message, java.lang.String folder)
public IMAPMessageRenderingOperation htmlBodyRenderingOperation(IMAPMessage message, java.lang.String folder)
public IMAPMessageRenderingOperation plainTextRenderingOperation(IMAPMessage message, java.lang.String folder)
public IMAPMessageRenderingOperation plainTextBodyRenderingOperation(IMAPMessage message, java.lang.String folder, boolean stripWhitespace)