Class UserNotificationServerEvent

  • All Implemented Interfaces:
    ServerEvent

    public class UserNotificationServerEvent
    extends CommonServerEvent
    This server event is sent on the reception of a user notification.
    Author:
    Yohann Chastagnier.
    • Method Detail

      • getNbUnreadFor

        public static int getNbUnreadFor​(String userId)
        Gets the number of unread message of user represented by the given identifier.
        Parameters:
        userId - the identifier of a user.
        Returns:
        a number of unread message.
      • getEmitterUserId

        public String getEmitterUserId()
        Gets the identifier of the emitter of the notification.

        Please verify the use of this method by mobile services before modifying or deleting it.

        Returns:
        an identifier as string.
      • isConcerned

        public boolean isConcerned​(String receiverSessionId,
                                   User receiver)
        Description copied from interface: ServerEvent
        Indicates if the given receiver (behind the session) is concerned by the event. If not, the event is not sent.
        Parameters:
        receiverSessionId - the identifier of the receiver session.
        receiver - the user that will receive the event in its WEB client.
        Returns:
        true if given receiver is concerned, false otherwise.