|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
com.emarsys.ecommon.mail.JMailProperties
public class JMailProperties
Special Properties
for the use in a JavaMail(tm) environment.
Field Summary | |
---|---|
static java.lang.String |
J_MAIL_FOLDER_IMPL
specifies the class |
static java.lang.String |
MAIL_DAVMAIL_CLASS
|
static java.lang.String |
MAIL_DEBUG
|
static java.lang.String |
MAIL_ENCODING
|
static java.lang.String |
MAIL_HOST
|
static java.lang.String |
MAIL_IMAP_CLASS
|
static java.lang.String |
MAIL_IMAPS_CLASS
|
static java.lang.String |
MAIL_PASSWORD
|
static java.lang.String |
MAIL_POP3_CLASS
|
static java.lang.String |
MAIL_POP3S_CLASS
|
static java.lang.String |
MAIL_SMTP_CLASS
|
static java.lang.String |
MAIL_SMTP_HOST
|
static java.lang.String |
MAIL_SMTP_PORT
|
static java.lang.String |
MAIL_STORAGE_DEFAULT_FOLDER
specifies the default folder of a mail storage that will be used if no other folder is defined |
static java.lang.String |
MAIL_STORAGE_EXPUNGE_ERROR_TOLERANCE
an integer number that specifies how many errors on expunging attempts should be tolerated |
static java.lang.String |
MAIL_STORAGE_EXPUNGE_IMMEDIATELY
true if this mail folder should expunge mails to be removed immediately or on explicit calling respectively on folder closing |
static java.lang.String |
MAIL_STORAGE_SILENT_ERRORS
If set to true the JMailStorage will
throw MailStorageException s only if a further processing
is not possible - instead it will log the error and proceed with the
processing of the mail storage. |
static java.lang.String |
MAIL_STORE_PROTOCOL
|
static java.lang.String |
MAIL_USER
|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
JMailProperties()
|
|
JMailProperties(java.util.Properties defaults)
|
Method Summary | |
---|---|
java.lang.String |
getDefaultFolderName()
|
static JMailProperties |
getInstance()
Factory method. |
static JMailProperties |
getInstance(java.util.Properties props)
Factory method. |
static JMailProperties |
getInstance(javax.mail.URLName url)
Factory method that creates new JMailProperties
and sets the
properties it can get from the passed URLName . |
java.lang.Class<? extends JMailFolder> |
getJMailFolderImpl()
|
int |
getMailStorageErrorTolerance()
|
boolean |
getMailStorageExpungeImmediately()
|
static JMailProperties |
getMockInstance()
|
static JMailProperties |
getMockInstance(java.util.Properties props)
|
static JMailProperties |
getMockInstance(javax.mail.URLName url)
Factory method that creates new JMailProperties
and sets the
properties it can get from the passed URLName . |
boolean |
handleErrorsSilently()
Indicates whether to handle "non-breaking" errors silently or to raise an Exception . |
protected JMailProperties |
setDebug(boolean debug)
|
JMailProperties |
setJMailFolderImplementation(java.lang.Class<? extends JMailFolder> clazz)
|
JMailProperties |
setMailEncoding(java.lang.String encoding)
|
void |
setMailProperties(javax.mail.URLName url)
Extracts javamail related properties from the passed URLName
if present. |
JMailProperties |
setMailStorageExpungeErrorTolerance(int errCnt)
|
JMailProperties |
setMailStorageExpungeImmediately(boolean expunge)
|
protected void |
setPropIfValid(java.lang.String name,
java.lang.String value)
|
protected JMailProperties |
useMockProviders()
|
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MAIL_HOST
public static final java.lang.String MAIL_USER
public static final java.lang.String MAIL_PASSWORD
public static final java.lang.String MAIL_DEBUG
public static final java.lang.String MAIL_STORE_PROTOCOL
public static final java.lang.String MAIL_SMTP_HOST
public static final java.lang.String MAIL_SMTP_PORT
public static final java.lang.String MAIL_SMTP_CLASS
public static final java.lang.String MAIL_POP3_CLASS
public static final java.lang.String MAIL_POP3S_CLASS
public static final java.lang.String MAIL_IMAP_CLASS
public static final java.lang.String MAIL_IMAPS_CLASS
public static final java.lang.String MAIL_DAVMAIL_CLASS
public static final java.lang.String MAIL_ENCODING
public static final java.lang.String MAIL_STORAGE_SILENT_ERRORS
true
the JMailStorage
will
throw MailStorageException
s only if a further processing
is not possible - instead it will log the error and proceed with the
processing of the mail storage.
public static final java.lang.String MAIL_STORAGE_DEFAULT_FOLDER
public static final java.lang.String MAIL_STORAGE_EXPUNGE_IMMEDIATELY
public static final java.lang.String MAIL_STORAGE_EXPUNGE_ERROR_TOLERANCE
public static final java.lang.String J_MAIL_FOLDER_IMPL
Constructor Detail |
---|
public JMailProperties()
public JMailProperties(java.util.Properties defaults)
defaults
- Method Detail |
---|
public static final JMailProperties getInstance()
public static final JMailProperties getInstance(java.util.Properties props)
props
-
public static final JMailProperties getInstance(javax.mail.URLName url)
JMailProperties
and sets
the
properties it can get from the passed URLName
.
url
-
setMailProperties(URLName)
public static final JMailProperties getMockInstance()
public static final JMailProperties getMockInstance(java.util.Properties props)
props
-
public static final JMailProperties getMockInstance(javax.mail.URLName url)
JMailProperties
and sets
the
properties it can get from the passed URLName
.
url
-
setMailProperties(URLName)
protected JMailProperties useMockProviders()
protected JMailProperties setDebug(boolean debug)
debug
-
public void setMailProperties(javax.mail.URLName url)
Extracts javamail related properties from the passed URLName
if present.
Currently the extraction of properties from the passed url
supports only MAIL_STORE_PROTOCOL
, MAIL_HOST
,
MAIL_USER
and MAIL_PASSWORD
.
url
- protected void setPropIfValid(java.lang.String name, java.lang.String value)
name
- value
- public boolean handleErrorsSilently()
Exception
.
true
if the
MAIL_STORAGE_SILENT_ERRORS
is set to
true
, false
otherwise.public java.lang.String getDefaultFolderName()
MAIL_STORAGE_DEFAULT_FOLDER
or "INBOX" if not set.public java.lang.Class<? extends JMailFolder> getJMailFolderImpl()
public JMailProperties setJMailFolderImplementation(java.lang.Class<? extends JMailFolder> clazz)
clazz
-
public boolean getMailStorageExpungeImmediately()
public JMailProperties setMailStorageExpungeImmediately(boolean expunge)
expunge
-
public int getMailStorageErrorTolerance()
public JMailProperties setMailStorageExpungeErrorTolerance(int errCnt)
expunge
-
public JMailProperties setMailEncoding(java.lang.String encoding)
encoding
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |