Package org.exoplatform.chat.server
Class CometdService
- java.lang.Object
-
- org.exoplatform.chat.server.CometdService
-
@Service public class CometdService extends Object
This service is used to receive all Cometd messages and then publish the messages to the right clients. A Cometd service channel is used so the messages sent by clients on this channel are only sent to the server (so by this service) and not to all the subscribed clients. It is up to the server to forward the messages to the right clients.
-
-
Constructor Summary
Constructors Constructor Description CometdService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonMessageReceived(org.cometd.bayeux.server.ServerSession remoteSession, org.cometd.bayeux.server.ServerMessage message)This method receives all the websocket messages sent to the channel COMETD_CHANNEL_NAME and process them accordingly to their type
-
-
-
Method Detail
-
onMessageReceived
@Listener("/service/chat") public void onMessageReceived(org.cometd.bayeux.server.ServerSession remoteSession, org.cometd.bayeux.server.ServerMessage message)This method receives all the websocket messages sent to the channel COMETD_CHANNEL_NAME and process them accordingly to their type- Parameters:
remoteSession-message-
-
-