public abstract class AbstractMailConnector
extends java.lang.Object
implements eu.tsystems.mms.tic.testframework.logging.Loggable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.function.Consumer<java.util.Properties> |
sessionPropertiesConfigurationConsumer |
| Constructor and Description |
|---|
AbstractMailConnector() |
| Modifier and Type | Method and Description |
|---|---|
AbstractMailConnector |
configureSessionProperties(java.util.function.Consumer<java.util.Properties> consumer)
Sets a consumer for configuring properties right before
openSession() |
protected javax.mail.Session |
createDefaultSession(java.util.Properties mailProperties,
java.lang.String protocol) |
java.lang.String |
getInboxFolder()
gets the inboxFolder
|
java.lang.String |
getPassword()
gets the password
|
java.lang.String |
getPort()
gets the port
|
java.lang.String |
getServer()
gets the server
|
javax.mail.Session |
getSession()
gets the session
|
java.lang.String |
getUsername()
gets the username
|
boolean |
isDebug()
checks if the debug is true or false
|
boolean |
isSslEnabled()
checks the sslEnabled if it is true or false
|
protected abstract void |
openSession() |
void |
setDebug(boolean debug)
sets the debug
|
void |
setInboxFolder(java.lang.String inboxFolder)
sets the inboxFolder
|
void |
setPassword(java.lang.String password)
sets the password
|
void |
setPort(java.lang.String port)
sets the port
|
void |
setServer(java.lang.String server)
sets the server
|
void |
setSession(javax.mail.Session session)
sets the session
|
void |
setSslEnabled(boolean sslEnabled)
sets the sslEnabled
|
void |
setUsername(java.lang.String username)
sets the username
|
protected java.util.function.Consumer<java.util.Properties> sessionPropertiesConfigurationConsumer
protected abstract void openSession()
public AbstractMailConnector configureSessionProperties(java.util.function.Consumer<java.util.Properties> consumer)
openSession()protected javax.mail.Session createDefaultSession(java.util.Properties mailProperties,
java.lang.String protocol)
public javax.mail.Session getSession()
public java.lang.String getServer()
public void setServer(java.lang.String server)
server - the server to setpublic java.lang.String getPort()
public void setPort(java.lang.String port)
port - the port to setpublic java.lang.String getInboxFolder()
public void setInboxFolder(java.lang.String inboxFolder)
inboxFolder - the inboxFolder to setpublic java.lang.String getUsername()
public void setUsername(java.lang.String username)
username - the username to setpublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password - the password to setpublic boolean isDebug()
public void setDebug(boolean debug)
debug - the debug to setpublic boolean isSslEnabled()
public void setSslEnabled(boolean sslEnabled)
sslEnabled - the sslEnabled to setpublic void setSession(javax.mail.Session session)
session - the session to set