Class MessageSenderAbstract
java.lang.Object
org.bardframework.flow.processor.message.sender.MessageSenderAbstract
- All Implemented Interfaces:
MessageSender
- Direct Known Subclasses:
MessageSenderEmail,MessageSenderNoOp,MessageSenderSms
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Patternprotected DateTimeFormatterprotected DateTimeFormatterprotected DateTimeFormatterprotected final Stringprotected booleanprotected Executorprotected booleanprotected final MessageProviderprotected final Stringprotected intprotected DateTimeFormatter -
Constructor Summary
ConstructorsConstructorDescriptionMessageSenderAbstract(String receiverFieldName, MessageProvider messageProvider, String errorMessageKey) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddExtraArgs(Map<String, String> args) intbooleanbooleanprotected abstract voidfinal voidvoidsetCanSendRegex(String canSendRegex) voidsetDateFormatGregorian(DateTimeFormatter dateFormatGregorian) voidsetDateFormatterHijrah(DateTimeFormatter dateFormatterHijrah) voidsetDateFormatterJalali(DateTimeFormatter dateFormatterJalali) voidsetExecuteInNewThread(boolean executeInNewThread) voidsetFailOnError(boolean failOnError) voidsetThreadPoolSize(int threadPoolSize) voidsetTimeFormat(DateTimeFormatter timeFormat) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bardframework.flow.processor.message.sender.MessageSender
canSend
-
Field Details
-
receiverFieldName
-
messageProvider
-
errorMessageKey
-
canSendRegex
-
executor
-
threadPoolSize
protected int threadPoolSize -
failOnError
protected boolean failOnError -
executeInNewThread
protected boolean executeInNewThread -
dateFormatGregorian
-
dateFormatterJalali
-
dateFormatterHijrah
-
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
- Specified by:
sendin interfaceMessageSender- Throws:
Exception
-
addExtraArgs
-
setCanSendRegex
-
canSendRegex
- Specified by:
canSendRegexin interfaceMessageSender
-
getMessageProvider
-
getReceiverFieldName
-
getExecutor
-
isFailOnError
public boolean isFailOnError() -
setFailOnError
public void setFailOnError(boolean failOnError) -
getDateFormatGregorian
-
setDateFormatGregorian
-
getDateFormatterJalali
-
setDateFormatterJalali
-
getDateFormatterHijrah
-
setDateFormatterHijrah
-
getTimeFormat
-
setTimeFormat
-
isExecuteInNewThread
public boolean isExecuteInNewThread() -
setExecuteInNewThread
public void setExecuteInNewThread(boolean executeInNewThread) -
getThreadPoolSize
public int getThreadPoolSize() -
setThreadPoolSize
public void setThreadPoolSize(int threadPoolSize)
-