Class BroadcastService

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class BroadcastService
    extends ServiceConfig
    BroadcastService Class

    AWE Broadcast Engine Provides generate function to send information to client

    Author:
    Pablo GARCIA
    • Constructor Detail

      • BroadcastService

        public BroadcastService​(org.springframework.messaging.simp.SimpMessagingTemplate brokerMessagingTemplate,
                                AweConnectionTracker connectionTracker)
        Autowired constructor
        Parameters:
        brokerMessagingTemplate - Broker messaging template
        connectionTracker - Connection tracker
    • Method Detail

      • broadcastMessage

        public void broadcastMessage​(ClientAction... actionList)
        Broadcast an action list
        Parameters:
        actionList - Action list to broadcast
      • broadcastMessageToScreen

        public void broadcastMessageToScreen​(String screen,
                                             ClientAction... actionList)
        Broadcast an action list
        Parameters:
        screen - Screen to broadcast messages to
        actionList - Action list to broadcast
      • broadcastMessage

        public void broadcastMessage​(List<ClientAction> actionList)
        Broadcast an action list
        Parameters:
        actionList - Action list to broadcast
      • broadcastMessageToUser

        public void broadcastMessageToUser​(String user,
                                           ClientAction... actionList)
        Broadcast an action list to a user
        Parameters:
        user - User
        actionList - Action list to broadcast
      • broadcastMessageToUser

        public void broadcastMessageToUser​(String user,
                                           List<ClientAction> actionList)
        Broadcast an action list to a user
        Parameters:
        user - User
        actionList - Action list to broadcast
      • broadcastMessageToUsers

        public void broadcastMessageToUsers​(ClientAction action,
                                            String... users)
        Broadcast an action to some users
        Parameters:
        action - Action to broadcast
        users - User list
      • broadcastMessageToUsers

        public void broadcastMessageToUsers​(List<ClientAction> actions,
                                            String... users)
        Broadcast an action list to some users
        Parameters:
        actions - Action list to broadcast
        users - User list
      • broadcastMessageToUID

        public void broadcastMessageToUID​(String cometUID,
                                          ClientAction... actionList)
        Broadcast an action list to a connection
        Parameters:
        cometUID - Connection ID
        actionList - Action list to broadcast
      • broadcastMessageToUID

        public void broadcastMessageToUID​(String cometUID,
                                          List<ClientAction> actionList)
        Broadcast an action list to a connection
        Parameters:
        cometUID - Connection ID
        actionList - Action list to broadcast
      • sendMessageToUser

        public ServiceData sendMessageToUser​(String user,
                                             String message)
        Send a message to a user
        Parameters:
        user - User
        message - Message to send
        Returns:
        Service data
      • sendError

        public void sendError​(String title,
                              String message)
        Send an error message
        Parameters:
        title - Title
        message - Message to send
      • sendErrorToUser

        public void sendErrorToUser​(String user,
                                    String title,
                                    String message)
        Send an error message to a user
        Parameters:
        user - Connection id
        title - Title
        message - Message to send
      • sendErrorToUID

        public void sendErrorToUID​(String cometUID,
                                   String title,
                                   String message)
        Send an error message to a connection
        Parameters:
        cometUID - Connection id
        title - Title
        message - Message to send