Class MessageSenderAbstract

java.lang.Object
org.bardframework.flow.processor.message.sender.MessageSenderAbstract
All Implemented Interfaces:
MessageSender
Direct Known Subclasses:
MessageSenderEmail, MessageSenderNoOp, MessageSenderSms

public abstract class MessageSenderAbstract extends Object implements MessageSender
  • Field Details

    • receiverFieldName

      protected final String receiverFieldName
    • messageProvider

      protected final MessageProvider messageProvider
    • errorMessageKey

      protected final String errorMessageKey
    • canSendRegex

      protected Pattern canSendRegex
    • executor

      protected Executor executor
    • threadPoolSize

      protected int threadPoolSize
    • failOnError

      protected boolean failOnError
    • executeInNewThread

      protected boolean executeInNewThread
    • dateFormatGregorian

      protected DateTimeFormatter dateFormatGregorian
    • dateFormatterJalali

      protected DateTimeFormatter dateFormatterJalali
    • dateFormatterHijrah

      protected DateTimeFormatter dateFormatterHijrah
    • timeFormat

      protected DateTimeFormatter timeFormat
  • Constructor Details

    • MessageSenderAbstract

      public MessageSenderAbstract(String receiverFieldName, MessageProvider messageProvider, String errorMessageKey)
  • Method Details

    • send

      protected abstract void send(String receiver, String message, Map<String,String> args, Locale locale) throws Exception
      Throws:
      Exception
    • send

      public final void send(Map<String,String> data, Locale locale) throws Exception
      Specified by:
      send in interface MessageSender
      Throws:
      Exception
    • addExtraArgs

      protected void addExtraArgs(Map<String,String> args)
    • setCanSendRegex

      public void setCanSendRegex(String canSendRegex)
    • canSendRegex

      public Pattern canSendRegex()
      Specified by:
      canSendRegex in interface MessageSender
    • getMessageProvider

      public MessageProvider getMessageProvider()
    • getReceiverFieldName

      public String getReceiverFieldName()
    • getExecutor

      public Executor getExecutor()
    • isFailOnError

      public boolean isFailOnError()
    • setFailOnError

      public void setFailOnError(boolean failOnError)
    • getDateFormatGregorian

      public DateTimeFormatter getDateFormatGregorian()
    • setDateFormatGregorian

      public void setDateFormatGregorian(DateTimeFormatter dateFormatGregorian)
    • getDateFormatterJalali

      public DateTimeFormatter getDateFormatterJalali()
    • setDateFormatterJalali

      public void setDateFormatterJalali(DateTimeFormatter dateFormatterJalali)
    • getDateFormatterHijrah

      public DateTimeFormatter getDateFormatterHijrah()
    • setDateFormatterHijrah

      public void setDateFormatterHijrah(DateTimeFormatter dateFormatterHijrah)
    • getTimeFormat

      public DateTimeFormatter getTimeFormat()
    • setTimeFormat

      public void setTimeFormat(DateTimeFormatter timeFormat)
    • isExecuteInNewThread

      public boolean isExecuteInNewThread()
    • setExecuteInNewThread

      public void setExecuteInNewThread(boolean executeInNewThread)
    • getThreadPoolSize

      public int getThreadPoolSize()
    • setThreadPoolSize

      public void setThreadPoolSize(int threadPoolSize)