Package com.atlassian.confluence.jmx
Class JmxSMTPMailServer
java.lang.Object
com.atlassian.mail.server.AbstractMailServer
com.atlassian.mail.server.impl.SMTPMailServerImpl
com.atlassian.confluence.jmx.JmxSMTPMailServer
- All Implemented Interfaces:
com.atlassian.mail.server.auth.AuthenticationContextAware,com.atlassian.mail.server.MailServer,com.atlassian.mail.server.SMTPMailServer,Serializable
- Direct Known Subclasses:
ConfluenceSmtpMailServer
public class JmxSMTPMailServer
extends com.atlassian.mail.server.impl.SMTPMailServerImpl
Wraps the
SMTPMailServerImpl to provide metrics for
- The number of emails sent in total
- The number of emails succesfully delivered
- The time the last successful email was sent
- Connectivity without sending a test email
The actual registration is handled by an instance of
MailServerEventListener.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.mail.server.impl.SMTPMailServerImpl
com.atlassian.mail.server.impl.SMTPMailServerImpl.Builder<T extends com.atlassian.mail.server.impl.SMTPMailServerImpl.Builder<T>> -
Field Summary
Fields inherited from class com.atlassian.mail.server.impl.SMTPMailServerImpl
DEFAULT_TRANSPORT_CACHE_TTL, TRANSPORT_CACHE_TTL_PROPERTYFields inherited from class com.atlassian.mail.server.AbstractMailServer
isAuthenticating, logFields inherited from interface com.atlassian.mail.server.SMTPMailServer
DEFAULT_SMTP_PORT -
Constructor Summary
ConstructorsConstructorDescriptionJmxSMTPMailServer(Long id, String name, String description, String from, String prefix, boolean isSession, boolean removePrecedence, com.atlassian.mail.MailProtocol mailProtocol, String location, String smtpPort, boolean tlsRequired, String username, String password, long timeout) JmxSMTPMailServer(Long id, String name, String description, String from, String prefix, boolean isSession, String location, String username, String password) JmxSMTPMailServer(Long id, String name, String description, String from, String prefix, boolean isSession, String location, String username, String password, String smtpPort) JmxSMTPMailServer(Long id, String name, String description, String from, String prefix, boolean isSession, String location, String username, String password, String smtpPort, String fromName) -
Method Summary
Modifier and TypeMethodDescriptionintintvoidquietSend(com.atlassian.mail.Email email) voidsend(com.atlassian.mail.Email email) voidsetFromName(String fromName) Methods inherited from class com.atlassian.mail.server.impl.SMTPMailServerImpl
equals, getDefaultFrom, getDefaultReplyTo, getJndiLocation, getJndiSession, getPrefix, getSession, getTransportCacheTtl, getType, hashCode, isRemovePrecedence, isSessionServer, isTlsHostnameCheckRequired, propertyChanged, sendMimeMessage, sendWithMessageId, setDefaultFrom, setDefaultReplyTo, setJndiLocation, setPrefix, setRemovePrecedence, setSessionServer, setTlsHostnameCheckRequired, toStringMethods inherited from class com.atlassian.mail.server.AbstractMailServer
getAuthenticationContext, getAuthenticator, getConnectionTimeout, getDebug, getDebugStream, getDescription, getHostname, getId, getMailProtocol, getMoreDebugInfoAboutCreatedSession, getName, getPassword, getPort, getProperties, getSessionFromServerManager, getSessionFromServerManagerInternal, getSocksHost, getSocksPort, getTimeout, getUsername, isTlsRequired, loadSystemProperties, setAuthenticationContext, setConnectionTimeout, setDebug, setDebugStream, setDescription, setHostname, setId, setLogger, setMailProtocol, setName, setPassword, setPort, setProperties, setSocksHost, setSocksPort, setTimeout, setTlsRequired, setUsername, smartConnectMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.mail.server.MailServer
getDescription, getHostname, getId, getMailProtocol, getName, getPassword, getPort, getProperties, getSocksHost, getSocksPort, getTimeout, getUsername, setDebugStream, setDescription, setHostname, setId, setLogger, setMailProtocol, setName, setPassword, setPort, setProperties, setSocksHost, setSocksPort, setTimeout, setUsernameMethods inherited from interface com.atlassian.mail.server.SMTPMailServer
getDebug, getDebugStream, isTlsRequired, isTransportCachingEnabled, setDebug, setTlsRequired
-
Constructor Details
-
JmxSMTPMailServer
public JmxSMTPMailServer() -
JmxSMTPMailServer
-
JmxSMTPMailServer
-
JmxSMTPMailServer
-
JmxSMTPMailServer
-
-
Method Details
-
quietSend
public void quietSend(com.atlassian.mail.Email email) throws com.atlassian.mail.MailException - Specified by:
quietSendin interfacecom.atlassian.mail.server.SMTPMailServer- Overrides:
quietSendin classcom.atlassian.mail.server.impl.SMTPMailServerImpl- Throws:
com.atlassian.mail.MailException
-
send
public void send(com.atlassian.mail.Email email) throws com.atlassian.mail.MailException - Specified by:
sendin interfacecom.atlassian.mail.server.SMTPMailServer- Overrides:
sendin classcom.atlassian.mail.server.impl.SMTPMailServerImpl- Throws:
com.atlassian.mail.MailException
-
getEmailsSent
public int getEmailsSent() -
getEmailsAttempted
public int getEmailsAttempted() -
getLastSuccessful
-
getFromName
-
setFromName
-