Class MessageSender.SynchSender

  • Enclosing class:
    MessageSender

    private static class MessageSender.SynchSender
    extends MessageSender
    MessageSender implementation which uses the Synchronous Call/Response pattern.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int timeout_  
    • Constructor Summary

      Constructors 
      Constructor Description
      SynchSender​(int timeout)
      Constructor.
    • Field Detail

      • timeout_

        private final int timeout_
    • Constructor Detail

      • SynchSender

        SynchSender​(int timeout)
        Constructor.
        Parameters:
        timeout - in seconds
    • Method Detail

      • getResponses

        public java.util.Map getResponses​(HubConnection connection,
                                          Message msg,
                                          java.lang.String[] recIds)
                                   throws java.io.IOException
        Description copied from class: MessageSender
        Sends a message to a given list of recipients. If recipientIds is null, then will be sent to all subscribed clients.
        Specified by:
        getResponses in class MessageSender
        Parameters:
        connection - hub connection
        msg - message to send
        recIds - array of recipients to target, or null
        Returns:
        responder Client -> Response map
        Throws:
        java.io.IOException