Modifier and Type | Field and Description |
---|---|
protected Lock |
lock |
Modifier | Constructor and Description |
---|---|
protected |
BaseChannelImpl(long companyId,
long userId) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
void |
close() |
protected abstract void |
doCleanUp() |
long |
getCompanyId() |
List<NotificationEvent> |
getNotificationEvents() |
long |
getUserId() |
boolean |
hasNotificationEvents() |
protected void |
notifyChannelListeners() |
void |
registerChannelListener(ChannelListener channelListener) |
void |
setCleanUpInterval(long cleanUpInterval) |
void |
unregisterChannelListener(ChannelListener channelListener) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
confirmDelivery, confirmDelivery, confirmDelivery, confirmDelivery, deleteUserNotificiationEvent, deleteUserNotificiationEvents, flush, flush, getNotificationEvents, init, removeTransientNotificationEvents, removeTransientNotificationEventsByUuid, sendNotificationEvent, sendNotificationEvents, storeNotificationEvent
public void cleanUp() throws ChannelException
cleanUp
in interface Channel
ChannelException
public void close() throws ChannelException
close
in interface Channel
ChannelException
public long getCompanyId()
public List<NotificationEvent> getNotificationEvents() throws ChannelException
getNotificationEvents
in interface Channel
ChannelException
public boolean hasNotificationEvents()
public void registerChannelListener(ChannelListener channelListener)
registerChannelListener
in interface Channel
public void setCleanUpInterval(long cleanUpInterval)
public void unregisterChannelListener(ChannelListener channelListener)
unregisterChannelListener
in interface Channel
protected abstract void doCleanUp() throws Exception
Exception
protected void notifyChannelListeners()