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 Channel {
024
025 public void cleanUp() throws ChannelException;
026
027 public Channel clone(long companyId, long userId);
028
029 public void close() throws ChannelException;
030
031 public void confirmDelivery(Collection<String> notificationEventUuids)
032 throws ChannelException;
033
034 public void confirmDelivery(String notificationEventUuid)
035 throws ChannelException;
036
037 public void flush() throws ChannelException;
038
039 public void flush(long timestamp) throws ChannelException;
040
041 public List<NotificationEvent> getNotificationEvents()
042 throws ChannelException;
043
044 public List<NotificationEvent> getNotificationEvents(boolean flush)
045 throws ChannelException;
046
047 public long getUserId();
048
049 public void init() throws ChannelException;
050
051 public void registerChannelListener(ChannelListener channelListener);
052
053 public void removeTransientNotificationEvents(
054 Collection<NotificationEvent> notificationEvents);
055
056 public void removeTransientNotificationEventsByUuid(
057 Collection<String> notificationEventUuids);
058
059 public void sendNotificationEvent(NotificationEvent notificationEvent)
060 throws ChannelException;
061
062 public void sendNotificationEvents(
063 Collection<NotificationEvent> notificationEvents)
064 throws ChannelException;
065
066 public void unregisterChannelListener(ChannelListener channelListener);
067
068 }