public abstract class AbstractMailAccount extends Object implements MailAccount
Constructor and Description |
---|
AbstractMailAccount(String protocol,
String host,
String port,
String user,
String password,
String channel)
Create a new mail account.
|
Modifier and Type | Method and Description |
---|---|
Session |
getSession()
Get a
Session for this account.The account implementation can decide whether to cache the session instance or not. |
void |
setConnectionTimeout(int connectionTimeout)
Socket connection timeout value in milliseconds.
|
void |
setProperties(Properties properties)
Set additional properties.
|
void |
setTimeout(int timeout)
Socket read timeout value in milliseconds.
|
public AbstractMailAccount(String protocol, String host, String port, String user, String password, String channel)
protocol
- server account protocolhost
- server hostnameport
- server portuser
- login namepassword
- login passwordchannel
- encryption channel (ssl, starttls or null)public void setConnectionTimeout(int connectionTimeout)
MailAccount
setConnectionTimeout
in interface MailAccount
connectionTimeout
- timeout valuepublic void setTimeout(int timeout)
MailAccount
setTimeout
in interface MailAccount
timeout
- timeout valuepublic void setProperties(Properties properties)
MailAccount
setProperties
in interface MailAccount
properties
- the properties to setpublic Session getSession()
MailAccount
Session
for this account.getSession
in interface MailAccount
Session
instance.