001
014
015 package com.liferay.portal.kernel.notifications;
016
017 import java.util.Collection;
018 import java.util.List;
019
020
023 public interface ChannelHub {
024
025 public void cleanUp() throws ChannelException;
026
027 public void cleanUp(long userId) throws ChannelException;
028
029 public ChannelHub clone(long companyId);
030
031 public void confirmDelivery(
032 long userId, Collection<String> notificationEventUuids)
033 throws ChannelException;
034
035 public void confirmDelivery(long userId, String notificationEventUuid)
036 throws ChannelException;
037
038 public Channel createChannel(long userId) throws ChannelException;
039
040 public void destroy() throws ChannelException;
041
042 public Channel destroyChannel(long userId) throws ChannelException;
043
044 public void flush() throws ChannelException;
045
046 public void flush(long userId) throws ChannelException;
047
048 public void flush(long userId, long timestamp) throws ChannelException;
049
050 public Channel getChannel(long userId) throws ChannelException ;
051
052 public Channel getChannel(long userId, boolean createIfAbsent)
053 throws ChannelException;
054
055 public List<NotificationEvent> getNotificationEvents(long userId)
056 throws ChannelException;
057
058 public List<NotificationEvent> getNotificationEvents(
059 long userId, boolean flush)
060 throws ChannelException;
061
062 public Collection<Long> getUserIds();
063
064 public void registerChannelListener(
065 long userId, ChannelListener channelListener)
066 throws ChannelException;
067
068 public void removeTransientNotificationEvents(
069 long userId, Collection<NotificationEvent> notificationEvents)
070 throws ChannelException;
071
072 public void removeTransientNotificationEventsByUuid(
073 long userId, Collection<String> notificationEventUuids)
074 throws ChannelException;
075
076 public void sendNotificationEvent(
077 long userId, NotificationEvent notificationEvent)
078 throws ChannelException;
079
080 public void sendNotificationEvents(
081 long userId, Collection<NotificationEvent> notificationEvents)
082 throws ChannelException;
083
084 public void unregisterChannelListener(
085 long userId, ChannelListener channelListener)
086 throws ChannelException;
087
088 }