public abstract class MailProvider
extends java.lang.Object
MailProvider - The main intention of the provider class is to make the implementing classes available which define the abstract
classes of mail API.| Modifier and Type | Method and Description |
|---|---|
abstract MailAccess<?,?> |
createNewMailAccess(com.openexchange.session.Session session)
Gets a newly created
mail access with default account ID. |
abstract MailAccess<? extends IMailFolderStorage,? extends IMailMessageStorage> |
createNewMailAccess(com.openexchange.session.Session session,
int accountId)
Gets a newly created
mail access. |
MailPermission |
createNewMailPermission(com.openexchange.session.Session session,
int accountId)
Gets a newly created
mail permission. |
boolean |
equals(java.lang.Object obj) |
abstract Protocol |
getProtocol()
Gets this mail provider's protocol
|
AbstractProtocolProperties |
getProtocolProps()
Gets the protocol properties
|
com.openexchange.spamhandler.SpamHandler |
getSpamHandler()
Gets the spam handler used by this mail provider.
|
int |
hashCode() |
boolean |
isDeprecated()
Checks if this provider is deprecated; any cached references should be discarded
|
void |
setDeprecated(boolean deprecated)
Sets the deprecated flag
|
void |
shutDown()
Performs provider's shut-down
|
void |
startUp()
Performs provider's start-up
|
boolean |
supportsProtocol(java.lang.String protocol)
Checks if this mail provider supports the given protocol (which is either in secure or non-secure notation).
|
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic boolean isDeprecated()
true if deprecated; otherwise falsepublic void setDeprecated(boolean deprecated)
deprecated - true if deprecated; otherwise falsepublic void startUp()
throws com.openexchange.exception.OXException
com.openexchange.exception.OXException - If start-up failspublic void shutDown()
throws com.openexchange.exception.OXException
com.openexchange.exception.OXException - if shut-down failspublic MailPermission createNewMailPermission(com.openexchange.session.Session session, int accountId)
mail permission.
Returns a default permission instance if mailing system does not support permission(s). Overwrite if
needed.
session - The sessionaccountId - The account identifiermail permission.public com.openexchange.spamhandler.SpamHandler getSpamHandler()
public abstract Protocol getProtocol()
public final boolean supportsProtocol(java.lang.String protocol)
This is a convenience method that invokes Protocol.isSupported(String)
protocol - The protocoltrue if supported; otherwise falsepublic abstract MailAccess<?,?> createNewMailAccess(com.openexchange.session.Session session) throws com.openexchange.exception.OXException
mail access with default account ID.
If specified session is null, a dummy instance for initialization purpose is supposed to be returned. Implementation may
return null in this case if no start-up/shut-down actions are needed.
session - The session providing needed user data; may be null to obtain a dummy instance for initialization purposemail access.com.openexchange.exception.OXException - If new mail access instance cannot be createdpublic abstract MailAccess<? extends IMailFolderStorage,? extends IMailMessageStorage> createNewMailAccess(com.openexchange.session.Session session, int accountId) throws com.openexchange.exception.OXException
mail access.
If specified session is null, a dummy instance for initialization purpose is supposed to be returned. Implementation may
return null in this case if no start-up/shut-down actions are needed.
session - The session providing needed user data; may be null to obtain a dummy instance for initialization purposeaccountId - The account IDmail access.com.openexchange.exception.OXException - If new mail access instance cannot be createdpublic AbstractProtocolProperties getProtocolProps()