@zeroc/ice
    Preparing search index...

    Class Properties

    A property set used to configure Ice applications. Properties are key/value pairs, with both keys and values being strings.

    Index

    Constructors

    • Initializes a new instance of the Properties class. The property set is initialized from the provided argument vector.

      Parameters

      • Optionalargs: string[]

        A command-line argument vector, possibly containing options to set properties. This method modifies the argument vector by removing any Ice-related options.

      • Optionaldefaults: Properties

        Default values for the property set. Settings in args override these defaults. May be null.

      Returns Properties

    Methods

    • Creates a deep copy of this property set.

      Returns Properties

      A deep copy of this property set.

    • Retrieves a sequence of command-line options that is equivalent to this property set. Each element of the returned sequence is a command-line option in the form --<key>=<value>.

      Returns StringSeq

      A sequence of command-line options representing this property set.

    • Get an Ice property by key. If the property is not set, its default value is returned.

      Parameters

      • key: string

        The property key.

      Returns string

      The property value.

      PropertyException - Thrown if the property is not a known Ice property.

    • Get an Ice property as an integer. If the property is not set, its default value is returned.

      Parameters

      • key: string

        The property key.

      Returns number

      The property value interpreted as an integer.

      PropertyException - Thrown if the property is not a known Ice property or the value is not a valid integer.

    • Retrieves an Ice property value as a list of strings. The strings must be separated by whitespace or commas. If the property is not set, an empty list is returned. The strings in the list can contain whitespace and commas if they are enclosed in single or double quotes. If quotes are mismatched, an empty list is returned. Within single or double quotes, the respective quote character can be escaped with a backslash. For example, O'Reilly can be written as O'Reilly, "O'Reilly", or 'O'Reilly'.

      Parameters

      • key: string

        The property key.

      Returns StringSeq

      The property value interpreted as a list of strings.

      PropertyException - Thrown if the property is not a known Ice property.

    • Retrieves all properties whose keys begin with the specified prefix. If prefix is an empty string, all properties are returned.

      Parameters

      • prefix: string

        The prefix to search for, or an empty string to retrieve all properties.

      Returns PropertyDict

      A dictionary containing the matching properties.

    • Get a property by key. If the property is not set, an empty string is returned.

      Parameters

      • key: string

        The property key.

      Returns string

      The property value.

    • Get a property as an integer. If the property is not set, 0 is returned.

      Parameters

      • key: string

        The property key.

      Returns number

      The property value interpreted as an integer.

      PropertyException - Thrown if the property value is not a valid integer.

    • Get a property as an integer. If the property is not set, the given default value is returned.

      Parameters

      • key: string

        The property key.

      • defaultValue: number

        The default value to use if the property does not exist.

      Returns number

      The property value interpreted as an integer, or the default value.

      PropertyException - Thrown if the property value is not a valid integer.

    • Retrieves a property value as a list of strings. The strings must be separated by whitespace or commas. If the property is not set, an empty list is returned. The strings in the list can contain whitespace and commas if they are enclosed in single or double quotes. If quotes are mismatched, an empty list is returned. Within single or double quotes, the respective quote character can be escaped with a backslash. For example, O'Reilly can be written as O'Reilly, "O'Reilly", or 'O'Reilly'.

      Parameters

      • key: string

        The property key.

      Returns StringSeq

      The property value interpreted as a list of strings.

    • Retrieves a property value as a list of strings. The strings must be separated by whitespace or commas. If the property is not set, an empty list is returned. The strings in the list can contain whitespace and commas if they are enclosed in single or double quotes. If quotes are mismatched, an empty list is returned. Within single or double quotes, the respective quote character can be escaped with a backslash. For example, O'Reilly can be written as O'Reilly, "O'Reilly", or 'O'Reilly'.

      Parameters

      • key: string

        The property key.

      • value: StringSeq

        The default value to use if the property is not set.

      Returns StringSeq

      The property value interpreted as a list of strings.

    • Get a property by key. If the property is not set, the given default value is returned.

      Parameters

      • key: string

        The property key.

      • value: string

        The default value to use if the property is not set.

      Returns string

      The property value or the default value.

    • Loads properties from the contents of an Ice configuration file.

      Parameters

      • data: string

        The contents of the configuration file as a string.

      Returns void

    • Converts a sequence of command-line options into properties. All options that begin with --<prefix>. are converted into properties. If the prefix is empty, all options that begin with -- are converted to properties.

      Parameters

      • prefix: string

        The property prefix, or an empty string to convert all options starting with --.

      • options: StringSeq

        The command-line options to be converted.

      Returns StringSeq

      The command-line options that do not start with the specified prefix, in their original order.

    • Converts a sequence of command-line options into properties. All options that begin with one of the following prefixes are converted into properties: --Ice, --IceBox, --IceGrid, --IceSSL, --IceStorm, and --Glacier2.

      Parameters

      • options: StringSeq

        The command-line options to be converted.

      Returns StringSeq

      The command-line options that do not start with one of the listed prefixes, in their original order.

    • Sets a property with the specified key and value. To unset a property, set its value to an empty string.

      Parameters

      • key: string

        The property key.

      • value: string

        The property value.

      Returns void