Interface DynamicBroadcastConfig

  • All Known Implementing Classes:
    DocumentBroadcastConfig

    public interface DynamicBroadcastConfig
    Broadcast configuration. Configuration is dynamic, that means can change over time. The configuration consists of a list of connected clients. Each client can connect and disconnect, and therefore allow other clients to connect to it.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ID
      The unique id of this client.
      static java.lang.String LISTENER
      The listener address, for example the IP address and port.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String connect​(java.util.Map<java.lang.String,​java.lang.String> clientInfo)
      Announce a new client to others.
      void disconnect​(java.lang.String id)
      Sign off.
      java.util.List<java.util.Map<java.lang.String,​java.lang.String>> getClientInfo()
      Get the client info of all connected clients.
      java.lang.String getConfig()
      Get the global configuration data that is not associated to a specific client.
    • Field Detail

      • LISTENER

        static final java.lang.String LISTENER
        The listener address, for example the IP address and port.
        See Also:
        Constant Field Values
    • Method Detail

      • getConfig

        java.lang.String getConfig()
        Get the global configuration data that is not associated to a specific client.
        Returns:
        the configuration
      • getClientInfo

        java.util.List<java.util.Map<java.lang.String,​java.lang.String>> getClientInfo()
        Get the client info of all connected clients.
        Returns:
        the list of client info maps
      • connect

        java.lang.String connect​(java.util.Map<java.lang.String,​java.lang.String> clientInfo)
        Announce a new client to others.
        Parameters:
        clientInfo - the client info
        Returns:
        a unique id (to be used when disconnecting)
      • disconnect

        void disconnect​(java.lang.String id)
        Sign off.
        Parameters:
        id - the unique id