com.atlassian.confluence.jmx
Class JmxSMTPMailServer

java.lang.Object
  extended by com.atlassian.mail.server.AbstractMailServer
      extended by com.atlassian.mail.server.impl.SMTPMailServerImpl
          extended by com.atlassian.confluence.jmx.JmxSMTPMailServer
All Implemented Interfaces:
com.atlassian.mail.server.MailServer, com.atlassian.mail.server.SMTPMailServer, Serializable

public class JmxSMTPMailServer
extends com.atlassian.mail.server.impl.SMTPMailServerImpl

Wraps the SMTPMailServerImpl to provide metrics for

Also allows the from name of emails to be set.

The actual registration is handled by an instance of MailServerEventListener.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.mail.server.AbstractMailServer
isAuthenticating, log
 
Fields inherited from interface com.atlassian.mail.server.SMTPMailServer
DEFAULT_SMTP_PORT
 
Constructor Summary
JmxSMTPMailServer()
           
JmxSMTPMailServer(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
 int getEmailsAttempted()
           
 int getEmailsSent()
           
 String getFromName()
           
 Date getLastSuccessful()
           
 boolean isActive()
           
 void quietSend(com.atlassian.mail.Email email)
           
 void send(com.atlassian.mail.Email email)
           
 void setFromName(String fromName)
           
 
Methods inherited from class com.atlassian.mail.server.impl.SMTPMailServerImpl
equals, getAuthenticator, getDefaultFrom, getJndiLocation, getJndiSession, getPrefix, getSession, getType, hashCode, isRemovePrecedence, isSessionServer, propertyChanged, sendWithMessageId, setDefaultFrom, setJndiLocation, setPrefix, setRemovePrecedence, setSessionServer, toString
 
Methods inherited from class com.atlassian.mail.server.AbstractMailServer
getDebug, getDebugStream, getDescription, getHostname, getId, getMailProtocol, getMoreDebugInfoAboutCreatedSession, getName, getPassword, getPort, getProperties, getSessionFromServerManager, getSocksHost, getSocksPort, getTimeout, getUsername, isTlsRequired, loadSystemProperties, setDebug, setDebugStream, setDescription, setHostname, setId, setLogger, setMailProtocol, setName, setPassword, setPort, setProperties, setSocksHost, setSocksPort, setTimeout, setTlsRequired, setUsername
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.mail.server.SMTPMailServer
getDebug, getDebugStream, isTlsRequired, setDebug, setTlsRequired
 
Methods 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, setUsername
 

Constructor Detail

JmxSMTPMailServer

public JmxSMTPMailServer()

JmxSMTPMailServer

public JmxSMTPMailServer(Long id,
                         String name,
                         String description,
                         String from,
                         String prefix,
                         boolean isSession,
                         String location,
                         String username,
                         String password)

JmxSMTPMailServer

public JmxSMTPMailServer(Long id,
                         String name,
                         String description,
                         String from,
                         String prefix,
                         boolean isSession,
                         String location,
                         String username,
                         String password,
                         String smtpPort)

JmxSMTPMailServer

public JmxSMTPMailServer(Long id,
                         String name,
                         String description,
                         String from,
                         String prefix,
                         boolean isSession,
                         String location,
                         String username,
                         String password,
                         String smtpPort,
                         String fromName)

JmxSMTPMailServer

public JmxSMTPMailServer(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)
Method Detail

quietSend

public void quietSend(com.atlassian.mail.Email email)
               throws com.atlassian.mail.MailException
Specified by:
quietSend in interface com.atlassian.mail.server.SMTPMailServer
Overrides:
quietSend in class com.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:
send in interface com.atlassian.mail.server.SMTPMailServer
Overrides:
send in class com.atlassian.mail.server.impl.SMTPMailServerImpl
Throws:
com.atlassian.mail.MailException

getEmailsSent

public int getEmailsSent()

getEmailsAttempted

public int getEmailsAttempted()

getLastSuccessful

public Date getLastSuccessful()

isActive

public boolean isActive()

getFromName

public String getFromName()

setFromName

public void setFromName(String fromName)


Copyright © 2003–2015 Atlassian. All rights reserved.