Class MucClientConfiguration

    • Constructor Detail

    • Method Detail

      • loadFromConfigService

         static Collection<MucClientConfiguration> loadFromConfigService(ConfigurationService config, String prefix, boolean removeIncomplete)

        Loads a list of MucClientConfiguration objects based on properties read from a ConfigurationService with a given prefix. See loadFromMap for the format of the properties.

        Parameters:
        config - the ConfigurationService to read properties from.
        prefix - the prefix for property names.
        removeIncomplete - whether to remove any incomplete (see isComplete) entries from the returned collection, or to return all of them regardless.
        Returns:

        a list of MucClientConfigurations described by properties in config with a prefix of prefix.

      • loadFromMap

         static Collection<MucClientConfiguration> loadFromMap(Map<String, String> properties, String prefix, boolean removeIncomplete)

        Loads a list of MucClientConfiguration objects based on properties in a Map with a given prefix. The properties can be described with map entries like this for an ID of "": PREFIX.HOSTNAME=hostname1 PREFIX.DOMAIN=domain Or like this for an ID of "id1": PREFIX.id1.HOSTNAME=hostname2 PREFIX.id1.USERNAME=user

        Parameters:
        properties - the Map which contains the properties.
        prefix - the common prefix (to be ignored) for the keys in the map.
        removeIncomplete - whether to remove any incomplete (see isComplete) entries from the returned collection, or to return all of them regardless.
        Returns:

        a list of MucClientConfigurations described by the entries of properties with a prefix of prefix.

      • getHostname

         String getHostname()
        Returns:

        the hostname (i.e. the address to connect to).

      • setHostname

         void setHostname(String hostname)

        Sets the hostname (i.e. the address to connect to).

        Parameters:
        hostname - the hostname
      • getPort

         String getPort()
        Returns:

        the XMPP server's port number.

      • setPort

         void setPort(String port)

        Sets the XMPP server's port.

        Parameters:
        port - the XMPP server's port
      • setDomain

         void setDomain(String domain)

        Sets the XMPP domain.

        Parameters:
        domain - the domain to set.
      • getUsername

         String getUsername()
        Returns:

        the username to use to authenticate to the XMPP server.

      • setUsername

         void setUsername(String username)

        Sets the username to use to authenticate to the XMPP server.

      • getPassword

         String getPassword()
        Returns:

        the password to use to authenticate to the XMPP server.

      • setPassword

         void setPassword(String password)

        Sets the password to use to authenticate to the XMPP server.

      • getMucJids

         List<String> getMucJids()
        Returns:

        the JID of the MUC to join, e.g. "JvbBrewery@conference.example.com,JigasiBrewery@conference.example.com"

      • setMucJids

         void setMucJids(List<String> mucJids)

        Sets the list of JIDs of the MUCs to join.

        Parameters:
        mucJids - the list of full JIDs of the MUCs to join.
      • setMucNickname

         void setMucNickname(String mucNickname)

        Sets the nickname to use when joining the MUCs.

        Parameters:
        mucNickname - the nickname.
      • setDisableCertificateVerification

         void setDisableCertificateVerification(boolean disableCertificateVerification)

        Sets whether TLS certificate verification should be disabled.

        Parameters:
        disableCertificateVerification - whether to disable TLS certificate verification.
      • getIqHandlerMode

         String getIqHandlerMode()
        Returns:

        a string which represents the mode (sync or async) to use for the smack IQ request handler.

      • setIqHandlerMode

         void setIqHandlerMode(String iqHandlerMode)

        Sets string which represents the mode (sync or async) to use for the smack IQ request handler.

      • getSecurityMode

         ConnectionConfiguration.SecurityMode getSecurityMode()

        Gets the security mode for the Smack XMPP connection.

      • setSecurityMode

         void setSecurityMode(ConnectionConfiguration.SecurityMode securityMode)

        Sets the security mode ("required", "ifpossible", or "disabled") for the Smack XMPP connection, or null for the default behavior.

      • isComplete

         boolean isComplete()

        Checks whether this MucClientConfiguration has all of the required properties.

        Returns:

        true if all required properties are set, and false otherwise.

      • setProperty

         void setProperty(String name, String value)

        Sets a property.

        Parameters:
        name - the name of the property.
        value - the value to set.