Class LoggingMessageSender

java.lang.Object
com.broadleafcommerce.notification.service.AbstractMessageSender
com.broadleafcommerce.notification.service.LoggingMessageSender
All Implemented Interfaces:
MessageSender

public class LoggingMessageSender extends AbstractMessageSender
MessageSender implementation that logs the Notification based on Log settings. Primarily useful for testing. To support testing, this Sender will throw exceptions based on the "throwException" property of the Notification (InvalidNotification, RetriableNotification, and SendNotification). Also sets the "MESSAGE_LOGGED" attribute to trace, debug, or info on the NotificationContext.
  • Constructor Details

    • LoggingMessageSender

      public LoggingMessageSender()
  • Method Details

    • instance

      public static LoggingMessageSender instance()
    • sendMessage

      public void sendMessage(Notification notification, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)