Class WebNotificationBadgeListener

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.listener.Listener<String,Object>
io.meeds.appcenter.listener.WebNotificationBadgeListener
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin, org.exoplatform.services.listener.ListenerBase<String,Object>

@Component public class WebNotificationBadgeListener extends org.exoplatform.services.listener.Listener<String,Object>
Refreshes the notification centre badge whenever the user's counter changes — a new notification, one read or removed, or the counter reset when the drawer is opened.

Pure glue: it holds no counting logic and only reports staleness. Because the notification plugin is self-cached, the eviction is a no-op here and this listener effectively just carries the notification to the browser, which then re-reads the value from the notification domain's own cache.

  • Field Summary

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    onEvent(org.exoplatform.services.listener.Event<String,Object> event)
     

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.exoplatform.services.listener.ListenerBase

    getName
  • Constructor Details

    • WebNotificationBadgeListener

      public WebNotificationBadgeListener()
  • Method Details

    • init

      @PostConstruct public void init()
    • onEvent

      public void onEvent(org.exoplatform.services.listener.Event<String,Object> event) throws Exception
      Throws:
      Exception