|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.mail.JMailSessionFactory
public final class JMailSessionFactory
Factory for JavaMail(tm) Session
instances with support for
ecommon mock Provider
s.
If the System
property "com.emarsys.ecommon.mail.session.mocking.enabled"
is set to "true" the eCommon mock providers will be used instead of the
ones configured in javamail(.default).providers.
file.
Field Summary | |
---|---|
static java.lang.String |
SYS_PROP_USE_MOCK_SESSION
|
static java.lang.String |
VENDOR
|
static java.lang.String |
VERSION
|
Constructor Summary | |
---|---|
JMailSessionFactory()
|
Method Summary | |
---|---|
static boolean |
enableMocking()
|
static javax.mail.Session |
getInstance(java.util.Properties props)
Factory method for Session s that might
use ecommon mock Provider s instead of the ones
configured in javamail(.default).providers! |
static javax.mail.Session |
getMockInstance()
Factory method for Session s that use ecommon mock
Provider s instead of the ones configured in
javamail(.default).providers in any case! |
static javax.mail.Session |
getMockInstance(java.util.Properties props)
Factory method for Session s that use ecommon mock
Provider s instead of the ones configured in
javamail(.default).providers in any case! |
static boolean |
isMockingEnabled()
Indicates whether Session s build by JMailSessionFactory
should use the eCommon mock Provider s or not. |
protected static void |
setMockProviders(javax.mail.Session session)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SYS_PROP_USE_MOCK_SESSION
public static final java.lang.String VENDOR
public static final java.lang.String VERSION
Constructor Detail |
---|
public JMailSessionFactory()
Method Detail |
---|
public static boolean isMockingEnabled()
Session
s build by JMailSessionFactory
should use the eCommon mock Provider
s or not.
true
if the System
property
"com.emarsys.ecommon.mail.session.mocking.enabled" is set to "true",
false
otherwise.public static boolean enableMocking()
public static javax.mail.Session getMockInstance(java.util.Properties props)
Session
s that use ecommon mock
Provider
s instead of the ones configured in
javamail(.default).providers in any case!
props
-
public static javax.mail.Session getMockInstance()
Session
s that use ecommon mock
Provider
s instead of the ones configured in
javamail(.default).providers in any case!
public static javax.mail.Session getInstance(java.util.Properties props)
Factory method for Session
s that might
use ecommon mock Provider
s instead of the ones
configured in javamail(.default).providers!
If the System
property "com.emarsys.ecommon.mail.session.mocking.enabled"
is set to "true" the eCommon mock providers will be used instead of the
ones configured in javamail(.default).providers.
props
-
protected static void setMockProviders(javax.mail.Session session)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |