Class DefaultServerMessageService
- java.lang.Object
-
- org.silverpeas.core.notification.user.server.channel.server.DefaultServerMessageService
-
- All Implemented Interfaces:
ServerMessageService
@Service @Singleton public class DefaultServerMessageService extends Object implements ServerMessageService
- Author:
- neysseri
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultServerMessageService()
Hidden constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteAll(String userId, String sessionId)
Deletes all the messages linked to the user and the session represented by given identifiers.void
deleteById(String msgId)
Deletes the message which is referenced by the given identifier.void
push(String userId, String message, String sessionId)
Pushes a new message into the context.ServerMsg
read(String userId, String sessionId)
Read the first message (the oldest in other words) about a user and a session.
-
-
-
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 interfaceServerMessageService
- 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 interfaceServerMessageService
- 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 interfaceServerMessageService
- 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 interfaceServerMessageService
- Parameters:
userId
- the identifier of the user.message
- the message content.sessionId
- the identifier of the session.
-
-