org.zeroexchange.messaging
Class DefaultMessageSender

java.lang.Object
  extended by org.zeroexchange.messaging.DefaultMessageSender
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, MessageSender

public class DefaultMessageSender
extends Object
implements MessageSender, org.springframework.beans.factory.InitializingBean

Author:
black

Constructor Summary
DefaultMessageSender()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  org.springframework.mail.SimpleMailMessage getSimpleMessage(Collection<User> recipients, User sender, String subject, String messageBody)
          Returns simple SimpleMailMessage object filled with the data from the specified event.
protected  void sendMailMassage(Collection<User> recipients, User sender, String subject, String body)
          Sends email message.
 void sendMessage(Collection<User> recipients, User sender, String subject, String body)
          Sends the message to the user specified by recipientNickname.
protected  void sendPrivateMassage(Collection<User> recipients, User sender, String subject, String body)
          Sends 'private' message.
 void setEmailingEnabled(boolean emailingEnabled)
           
 void setSystemEmail(String systemEmail)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageSender

public DefaultMessageSender()
Method Detail

setEmailingEnabled

public void setEmailingEnabled(boolean emailingEnabled)
Parameters:
emailingEnabled - the emailingEnabled to set

setSystemEmail

public void setSystemEmail(String systemEmail)

sendMessage

public void sendMessage(Collection<User> recipients,
                        User sender,
                        String subject,
                        String body)
Sends the message to the user specified by recipientNickname.

Specified by:
sendMessage in interface MessageSender

sendMailMassage

protected void sendMailMassage(Collection<User> recipients,
                               User sender,
                               String subject,
                               String body)
Sends email message.


sendPrivateMassage

protected void sendPrivateMassage(Collection<User> recipients,
                                  User sender,
                                  String subject,
                                  String body)
Sends 'private' message.


getSimpleMessage

protected org.springframework.mail.SimpleMailMessage getSimpleMessage(Collection<User> recipients,
                                                                      User sender,
                                                                      String subject,
                                                                      String messageBody)
Returns simple SimpleMailMessage object filled with the data from the specified event.


afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2013. All Rights Reserved.