Class DefaultServerMessageService

    • Constructor Detail

      • DefaultServerMessageService

        protected DefaultServerMessageService()
        Hidden constructor
    • Method Detail

      • read

        public ServerMsg read​(String userId,
                              String sessionId)
        Description copied from interface: ServerMessageService
        Read the first message (the oldest in other words) about a user and a session.
        Specified by:
        read in interface ServerMessageService
        Parameters:
        userId - the identifier of the user.
        sessionId - the identifier of the session.
        Returns:
        an instance of ServerMsg which represents the Silverpeas message.
      • deleteById

        public void deleteById​(String msgId)
        Description copied from interface: ServerMessageService
        Deletes the message which is referenced by the given identifier.
        Specified by:
        deleteById in interface ServerMessageService
        Parameters:
        msgId - the identifier of the message to delete.
      • deleteAll

        public void deleteAll​(String userId,
                              String sessionId)
        Description copied from interface: ServerMessageService
        Deletes all the messages linked to the user and the session represented by given identifiers.
        Specified by:
        deleteAll in interface ServerMessageService
        Parameters:
        userId - the identifier of the user.
        sessionId - the identifier of the session.
      • push

        public void push​(String userId,
                         String message,
                         String sessionId)
        Description copied from interface: ServerMessageService
        Pushes a new message into the context.
        Specified by:
        push in interface ServerMessageService
        Parameters:
        userId - the identifier of the user.
        message - the message content.
        sessionId - the identifier of the session.