Package org.exoplatform.chat.server
Class CometdService
java.lang.Object
org.exoplatform.chat.server.CometdService
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidonMessageReceived(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
-
Constructor Details
-
CometdService
public CometdService()
-
-
Method Details
-
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-
-