Class AbstractNotificationPollingService
- java.lang.Object
-
- io.tesler.notifications.service.impl.AbstractNotificationPollingService
-
- All Implemented Interfaces:
ISystemSettingChangeEventListener
,INotificationPollingService
,EventListener
,org.springframework.context.ApplicationListener<SystemSettingChangedEvent>
- Direct Known Subclasses:
NotificationDeltaPollingService
,NotificationInitialPollingService
public class AbstractNotificationPollingService extends Object implements ISystemSettingChangeEventListener, INotificationPollingService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.tesler.notifications.service.INotificationPollingService
INotificationPollingService.NotificationCtrlDTO
-
-
Constructor Summary
Constructors Constructor Description AbstractNotificationPollingService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.web.context.request.async.DeferredResult<ResponseDTO>
addTaskInQueue(Long recipientId, Long latestNotificationId, boolean unread)
void
executePollTaskInQueue()
protected void
init()
void
onApplicationEvent(SystemSettingChangedEvent event)
-
-
-
Method Detail
-
init
@PostConstruct protected void init()
-
onApplicationEvent
public void onApplicationEvent(SystemSettingChangedEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<SystemSettingChangedEvent>
- Specified by:
onApplicationEvent
in interfaceISystemSettingChangeEventListener
-
addTaskInQueue
public org.springframework.web.context.request.async.DeferredResult<ResponseDTO> addTaskInQueue(Long recipientId, Long latestNotificationId, boolean unread)
- Specified by:
addTaskInQueue
in interfaceINotificationPollingService
-
executePollTaskInQueue
@Scheduled(fixedRate=1000L) public void executePollTaskInQueue()
-
-