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

    Author:

    trydofor

    • Constructor Detail

      • TinyMailServiceImpl

        TinyMailServiceImpl()
    • 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 msg)

        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

      • setAppName

        @Value(value = "${spring.application.name}") void setAppName(String appName)
      • setLightIdService

        @Autowired() void setLightIdService(LightIdService lightIdService)
      • setJournalService

        @Autowired() void setJournalService(JournalService journalService)
      • setResourceLoader

        @Autowired() void setResourceLoader(ResourceLoader resourceLoader)
      • setTaskScheduler

        @Autowired()@Qualifier(value = "taskScheduler") void setTaskScheduler(ThreadPoolTaskScheduler taskScheduler)