public abstract class AbstractMailServer extends Object implements MailServer, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isAuthenticating |
protected org.apache.log4j.Logger |
log |
| Modifier | Constructor and Description |
|---|---|
|
AbstractMailServer() |
protected |
AbstractMailServer(long timeout) |
|
AbstractMailServer(Long id,
String name,
String description,
MailProtocol protocol,
String hostName,
String port,
String username,
String password,
long timeout,
String socksHost,
String socksPort) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
protected abstract javax.mail.Authenticator |
getAuthenticator() |
long |
getConnectionTimeout() |
boolean |
getDebug() |
PrintStream |
getDebugStream() |
String |
getDescription() |
String |
getHostname() |
Long |
getId() |
MailProtocol |
getMailProtocol() |
protected void |
getMoreDebugInfoAboutCreatedSession(javax.mail.Session session) |
String |
getName() |
String |
getPassword() |
String |
getPort() |
Properties |
getProperties() |
protected javax.mail.Session |
getSessionFromServerManager(Properties props,
javax.mail.Authenticator authenticator) |
String |
getSocksHost() |
String |
getSocksPort() |
long |
getTimeout() |
String |
getUsername() |
int |
hashCode() |
boolean |
isTlsRequired() |
protected Properties |
loadSystemProperties(Properties p)
This allows users of atlassian mail to add command line properties to modify session defaults
See JRA-11452
The hierarchy now is - default properties, then from the command line, then properties added via setProperties
|
protected void |
propertyChanged()
Call this method whenever a property of the server changes.
|
void |
setConnectionTimeout(long timeout) |
void |
setDebug(boolean debug) |
void |
setDebugStream(PrintStream debugStream)
If debug is enabled, output from underlying javamail will go to this stream.
|
void |
setDescription(String description) |
void |
setHostname(String serverName) |
void |
setId(Long id) |
void |
setLogger(org.apache.log4j.Logger logger) |
void |
setMailProtocol(MailProtocol protocol) |
void |
setName(String name) |
void |
setPassword(String password) |
void |
setPort(String port) |
void |
setProperties(Properties props) |
void |
setSocksHost(String socksHost) |
void |
setSocksPort(String socksPort) |
void |
setTimeout(long timeout) |
void |
setTlsRequired(boolean tlsRequired) |
void |
setUsername(String username) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSession, getTypeprotected transient org.apache.log4j.Logger log
protected boolean isAuthenticating
public AbstractMailServer()
protected AbstractMailServer(long timeout)
protected abstract javax.mail.Authenticator getAuthenticator()
public Long getId()
getId in interface MailServerpublic void setId(Long id)
setId in interface MailServerpublic String getName()
getName in interface MailServerpublic void setName(String name)
setName in interface MailServerpublic String getDescription()
getDescription in interface MailServerpublic void setDescription(String description)
setDescription in interface MailServerpublic String getHostname()
getHostname in interface MailServerpublic void setHostname(String serverName)
setHostname in interface MailServerpublic String getUsername()
getUsername in interface MailServerpublic void setUsername(String username)
setUsername in interface MailServerpublic String getPassword()
getPassword in interface MailServerpublic void setPassword(String password)
setPassword in interface MailServerpublic MailProtocol getMailProtocol()
getMailProtocol in interface MailServerpublic void setMailProtocol(MailProtocol protocol)
setMailProtocol in interface MailServerpublic String getPort()
getPort in interface MailServerpublic void setPort(String port)
setPort in interface MailServerpublic long getTimeout()
getTimeout in interface MailServerpublic long getConnectionTimeout()
public void setTimeout(long timeout)
setTimeout in interface MailServerpublic void setConnectionTimeout(long timeout)
public String getSocksHost()
getSocksHost in interface MailServerpublic void setSocksHost(String socksHost)
setSocksHost in interface MailServerpublic String getSocksPort()
getSocksPort in interface MailServerpublic void setSocksPort(String socksPort)
setSocksPort in interface MailServerpublic boolean isTlsRequired()
public void setTlsRequired(boolean tlsRequired)
public Properties getProperties()
getProperties in interface MailServerpublic void setProperties(Properties props)
setProperties in interface MailServerpublic void setDebug(boolean debug)
setDebug in interface MailServerpublic void setDebugStream(PrintStream debugStream)
MailServersetDebugStream in interface MailServerdebugStream - An optional stream to send debug messages to. If null, System.out is used.public boolean getDebug()
getDebug in interface MailServerpublic PrintStream getDebugStream()
protected void propertyChanged()
protected Properties loadSystemProperties(Properties p)
p - the default properties for the current mail sessionpublic void setLogger(org.apache.log4j.Logger logger)
setLogger in interface MailServerprotected void getMoreDebugInfoAboutCreatedSession(javax.mail.Session session)
protected javax.mail.Session getSessionFromServerManager(Properties props, javax.mail.Authenticator authenticator) throws MailException
MailExceptionCopyright © 2018 Atlassian. All rights reserved.