Class JPAQueueMessageImpl

  • All Implemented Interfaces:
    org.exoplatform.commons.api.notification.service.QueueMessage, org.picocontainer.Startable

    public class JPAQueueMessageImpl
    extends Object
    implements org.exoplatform.commons.api.notification.service.QueueMessage, org.picocontainer.Startable
    • Field Summary

      • Fields inherited from interface org.exoplatform.commons.api.notification.service.QueueMessage

        MESSAGE_ADDED_IN_QUEUE, MESSAGE_DELETED_FROM_QUEUE, MESSAGE_SENT_FROM_QUEUE
    • Constructor Summary

      Constructors 
      Constructor Description
      JPAQueueMessageImpl​(org.exoplatform.services.mail.MailService mailService, MailQueueDAO mailQueueDAO, org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.commons.api.persistence.DataInitializer dataInitializer, NotificationContextFactory notificationContextFactory, org.exoplatform.container.xml.InitParams params)  
    • Constructor Detail

      • JPAQueueMessageImpl

        public JPAQueueMessageImpl​(org.exoplatform.services.mail.MailService mailService,
                                   MailQueueDAO mailQueueDAO,
                                   org.exoplatform.services.listener.ListenerService listenerService,
                                   org.exoplatform.commons.api.persistence.DataInitializer dataInitializer,
                                   NotificationContextFactory notificationContextFactory,
                                   org.exoplatform.container.xml.InitParams params)
    • Method Detail

      • enable

        public void enable​(boolean enabled)
        Specified by:
        enable in interface org.exoplatform.commons.api.notification.service.QueueMessage
      • start

        public void start()
        Specified by:
        start in interface org.picocontainer.Startable
      • stop

        public void stop()
        Specified by:
        stop in interface org.picocontainer.Startable
      • put

        public boolean put​(org.exoplatform.commons.api.notification.model.MessageInfo message)
                    throws Exception
        Specified by:
        put in interface org.exoplatform.commons.api.notification.service.QueueMessage
        Throws:
        Exception
      • send

        public void send()
        Specified by:
        send in interface org.exoplatform.commons.api.notification.service.QueueMessage
      • sendMessage

        public boolean sendMessage​(org.exoplatform.commons.api.notification.model.MessageInfo message)
                            throws Exception
        Specified by:
        sendMessage in interface org.exoplatform.commons.api.notification.service.QueueMessage
        Throws:
        Exception
      • removeAll

        public void removeAll()
        Specified by:
        removeAll in interface org.exoplatform.commons.api.notification.service.QueueMessage