Class ApplicationBadgeWebSocketService

java.lang.Object
io.meeds.appcenter.service.ApplicationBadgeWebSocketService

@Service public class ApplicationBadgeWebSocketService extends Object
Notifies a browser that one of its badges changed.

The channel is push-only: nothing is ever read from it, so the client-controlled-input trust boundary that an inbound handler would have to guard simply does not exist here. The frame carries the badge name only, never the count — the browser has to re-fetch through the authenticated REST endpoint, where the ACL is applied again.

  • Field Details

  • Constructor Details

    • ApplicationBadgeWebSocketService

      public ApplicationBadgeWebSocketService()
  • Method Details

    • sendMessage

      public void sendMessage(String eventName, String badgeName, String username)
      Tells one user's connected sessions that a badge must be refreshed.
      Parameters:
      eventName - the WebSocket event name the browser listens to
      badgeName - the badge that changed
      username - the only user notified