Class AbstractChannel
- java.lang.Object
-
- org.exoplatform.container.component.BaseComponentPlugin
-
- org.exoplatform.commons.api.notification.channel.AbstractChannel
-
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public abstract class AbstractChannel extends org.exoplatform.container.component.BaseComponentPluginCreated by The eXo Platform SAS Author : eXoPlatform thanhvc@exoplatform.com Dec 12, 2014
-
-
Constructor Summary
Constructors Constructor Description AbstractChannel()Using the default life-cycleAbstractChannel(AbstractNotificationLifecycle lifecycle)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddispatch(NotificationInfo notifInfo)Process the notification infoabstract voiddispatch(NotificationContext ctx, String userId)Process the notification information for the specified user.voidend()abstract StringgetId()Gets ChannelIdabstract ChannelKeygetKey()Gets Channel KeyAbstractNotificationLifecyclegetLifecycle()Gets the lifecycle what assigned to the channelAbstractTemplateBuildergetTemplateBuilder(PluginKey key)Gets the template builder by the specified PluginKeyprotected abstract AbstractTemplateBuildergetTemplateBuilderInChannel(PluginKey key)StringgetTemplateFilePath(PluginKey key)Gets the template by the specified pluginIdbooleanhasTemplateBuilder(PluginKey key)Has the template builder of the plugin and the channelabstract voidregisterTemplateProvider(TemplateProvider provider)Register the template provider to the channel.voidstart()Initialize something when starts to work the channel
-
-
-
Constructor Detail
-
AbstractChannel
public AbstractChannel(AbstractNotificationLifecycle lifecycle)
-
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:
-
getLifecycle
public AbstractNotificationLifecycle getLifecycle()
Gets the lifecycle what assigned to the channel- Returns:
-
dispatch
public abstract void dispatch(NotificationContext ctx, String userId)
Process the notification information for the specified user.- Parameters:
ctx- The NotificationContextuserId- 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
-
getTemplateBuilderInChannel
protected abstract AbstractTemplateBuilder getTemplateBuilderInChannel(PluginKey key)
-
-