Class AbstractChannel

  • All Implemented Interfaces:
    org.exoplatform.container.component.ComponentPlugin

    public abstract class AbstractChannel
    extends org.exoplatform.container.component.BaseComponentPlugin
    Created by The eXo Platform SAS Author : eXoPlatform thanhvc@exoplatform.com Dec 12, 2014
    • Constructor Detail

      • AbstractChannel

        public AbstractChannel()
        Using the default life-cycle
    • Method Detail

      • start

        public void start()
        Initialize something when starts to work the channel
      • end

        public void end()
      • getId

        public abstract String getId()
        Gets ChannelId
        Returns:
      • getKey

        public abstract ChannelKey getKey()
        Gets Channel Key
        Returns:
      • dispatch

        public abstract void dispatch​(NotificationContext ctx,
                                      String userId)
        Process the notification information for the specified user.
        Parameters:
        ctx - The NotificationContext
        userId - the user will be received the message.
      • dispatch

        public void dispatch​(NotificationInfo notifInfo)
        Process the notification info
        Parameters:
        notifInfo - the notification information
      • registerTemplateProvider

        public abstract void registerTemplateProvider​(TemplateProvider provider)
        Register the template provider to the channel.
        Parameters:
        provider -
      • getTemplateFilePath

        public String getTemplateFilePath​(PluginKey key)
        Gets the template by the specified pluginId
        Parameters:
        key - the plugin key
      • hasTemplateBuilder

        public boolean hasTemplateBuilder​(PluginKey key)
        Has the template builder of the plugin and the channel
        Parameters:
        key - the plugin key
      • getTemplateBuilder

        public AbstractTemplateBuilder getTemplateBuilder​(PluginKey key)
        Gets the template builder by the specified PluginKey
        Parameters:
        key - the PluginKey