Package io.meeds.appcenter.service
Class ApplicationBadgeWebSocketService
java.lang.Object
io.meeds.appcenter.service.ApplicationBadgeWebSocketService
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsendMessage(String eventName, String badgeName, String username) Tells one user's connected sessions that a badge must be refreshed.
-
Field Details
-
COMETD_CHANNEL
- See Also:
-
BADGE_NAME_KEY
- See Also:
-
-
Constructor Details
-
ApplicationBadgeWebSocketService
public ApplicationBadgeWebSocketService()
-
-
Method Details
-
sendMessage
Tells one user's connected sessions that a badge must be refreshed.- Parameters:
eventName- the WebSocket event name the browser listens tobadgeName- the badge that changedusername- the only user notified
-