Class TinyMailServiceImpl
-
- All Implemented Interfaces:
-
org.springframework.beans.factory.InitializingBean,pro.fessional.wings.tiny.mail.service.TinyMailService
@Service()@ConditionalWingsEnabled() public class TinyMailServiceImpl implements TinyMailService, InitializingBean
- Since:
2023-01-06
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumTinyMailServiceImpl.Jane
-
Constructor Summary
Constructors Constructor Description TinyMailServiceImpl()
-
Method Summary
Modifier and Type Method Description booleansend(@NotNull() TinyMail message, boolean retry)Sync send, return success or not, or throw exception. booleanpost(@NotNull() TinyMail message, boolean retry)Sync send, fire and forget, no exception throw. longemit(@NotNull() TinyMail message, boolean retry)Async, no exception throw. booleansend(long id, boolean retry, boolean check)Sync send, fire and forget, no exception throw. booleanpost(long id, boolean retry, boolean check)Sync send, fire and forget, no exception throw. longemit(long id, boolean retry, boolean check)Async, no exception throw. longsave(@NotNull() TinyMailPlain message)Create(id is empty) or edit a mail, return the id intscan()Sync scan the mail to resend, return the count, and send them async voidafterPropertiesSet()voidsetAppName(String appName)voidsetLightIdService(LightIdService lightIdService)voidsetJournalService(JournalService journalService)voidsetWinMailSenderDao(WinMailSenderDao winMailSenderDao)voidsetMailConfigProvider(MailConfigProvider mailConfigProvider)voidsetMailSenderManager(MailSenderManager mailSenderManager)voidsetTinyMailServiceProp(TinyMailServiceProp tinyMailServiceProp)voidsetResourceLoader(ResourceLoader resourceLoader)voidsetStatusHooks(List<TinyMailService.StatusHook> statusHooks)voidsetTaskScheduler(ThreadPoolTaskScheduler taskScheduler)-
-
Method Detail
-
send
boolean send(@NotNull() TinyMail message, boolean retry)
Sync send, return success or not, or throw exception. If not success, async retry
-
post
boolean post(@NotNull() TinyMail message, boolean retry)
Sync send, fire and forget, no exception throw. If not success, async retry
-
emit
long emit(@NotNull() TinyMail message, boolean retry)
Async, no exception throw. auto batch send. Return the estimated sending time, `-1` for failure If not success, async retry.
-
send
boolean send(long id, boolean retry, boolean check)
Sync send, fire and forget, no exception throw. If not success, async retry, whether to check state before sending
-
post
boolean post(long id, boolean retry, boolean check)
Sync send, fire and forget, no exception throw. If not success, async retry, whether to check state before sending
-
emit
long emit(long id, boolean retry, boolean check)
Async, no exception throw. auto batch send. Return the estimated sending time, `-1` for failure If not success, async retry, whether to check state before sending
-
save
long save(@NotNull() TinyMailPlain message)
Create(id is empty) or edit a mail, return the id
-
scan
int scan()
Sync scan the mail to resend, return the count, and send them async
-
afterPropertiesSet
void afterPropertiesSet()
-
setAppName
@Value(value = "${spring.application.name}") void setAppName(String appName)
-
setLightIdService
@Autowired() void setLightIdService(LightIdService lightIdService)
-
setJournalService
@Autowired() void setJournalService(JournalService journalService)
-
setWinMailSenderDao
@Autowired() void setWinMailSenderDao(WinMailSenderDao winMailSenderDao)
-
setMailConfigProvider
@Autowired() void setMailConfigProvider(MailConfigProvider mailConfigProvider)
-
setMailSenderManager
@Autowired() void setMailSenderManager(MailSenderManager mailSenderManager)
-
setTinyMailServiceProp
@Autowired() void setTinyMailServiceProp(TinyMailServiceProp tinyMailServiceProp)
-
setResourceLoader
@Autowired() void setResourceLoader(ResourceLoader resourceLoader)
-
setStatusHooks
@Autowired(required = false) void setStatusHooks(List<TinyMailService.StatusHook> statusHooks)
-
setTaskScheduler
@Autowired()@Qualifier(value = "taskScheduler") void setTaskScheduler(ThreadPoolTaskScheduler taskScheduler)
-
-
-
-