Interface ClientNotificationService
- All Known Implementing Classes:
ClientNotificationServiceImpl
public interface ClientNotificationService
A class to send an information notification to the current user
Note: Notifications won't work in a persist or background task because they run in their own thread
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sendNotificationToClient
(TextMessage message) same behaviour assendNotificationToClient(String)
it just formats the givenTextMessage
.void
sendNotificationToClient
(String message) sends a notification to the current user using a ajax reverse call.
-
Method Details
-
sendNotificationToClient
same behaviour assendNotificationToClient(String)
it just formats the givenTextMessage
.- Parameters:
message
- the message to format and send to the client as notification
-
sendNotificationToClient
sends a notification to the current user using a ajax reverse call. If no current user is available, (could happen if a listener is triggered by a task) it won't send the notification. Note: If you wish to pass a text key, wrap it into aTextMessage
and ussendNotificationToClient(TextMessage)
- Parameters:
message
- the actual string to send to the client as notification (not the key)
-