Class UserSessionServerEvent

    • Method Detail

      • subType

        public String subType()
        Description copied from interface: ServerEvent
        Gets the sub type the event if any.
        Specified by:
        subType in interface ServerEvent
        Returns:
        the sub type of the event if any, empty string otherwise.
      • 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.
        Specified by:
        isConcerned in interface ServerEvent
        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.
      • getData

        public String getData​(String receiverSessionId,
                              User receiver)
        Description copied from interface: ServerEvent
        The data to send.
        Specified by:
        getData in interface ServerEvent
        Overrides:
        getData in class AbstractServerEvent
        Parameters:
        receiverSessionId - the identifier of the receiver session.
        receiver - the user that will receive the event in its WEB client.
        Returns:
        the data as string.