Class ScheduleFileDirQueue


  • public class ScheduleFileDirQueue
    extends Object
    This mail queue, working with a mail store, passes the mails to a mail processors according to the schedule. The schedule is defined by the time point in Mail.scheduleDate in each mail.
    • Constructor Detail

      • ScheduleFileDirQueue

        public ScheduleFileDirQueue()
        use this constructor with setters
      • ScheduleFileDirQueue

        public ScheduleFileDirQueue​(FileDirStore store,
                                    MailProcessorFactory mailProcessorFactory,
                                    java.util.concurrent.ScheduledThreadPoolExecutor executor)
        Parameters:
        executor - ScheduledThreadPoolExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean) will be called on it with false, to switch off waiting for tasks which are not even started on shutdown.
    • Method Detail

      • start

        @PostConstruct
        public void start()
      • shutdown

        public void shutdown()
        Initiates an orderly shutdown, no new mails will be accepted and processing of mails which are not yet started will not be started
      • setStore

        public void setStore​(FileDirStore store)
        Category:
        GETSET
      • setMailProcessorFactory

        public void setMailProcessorFactory​(MailProcessorFactory mailProcessorFactory)
        Category:
        GETSET
      • setExecutor

        public void setExecutor​(java.util.concurrent.ScheduledThreadPoolExecutor executor)
        Category:
        GETSET
      • setThreadCount

        public void setThreadCount​(int count)
        Category:
        GETSET
      • toString

        public String toString()
        Overrides:
        toString in class Object