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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 -