@zeroc/ice
    Preparing search index...

    Class Properties

    Represents a set of properties used to configure Ice and Ice-based applications. A property is a key/value pair, where both the key and the value are strings. By convention, property keys should have the form application-name[.category[.sub-category]].name.

    Index

    Constructors

    • Constructs a property set.

      Parameters

      • Optionalargs: string[]

        The command-line arguments. This constructor parses arguments starting with -- and one of the reserved prefixes (Ice, IceSSL, etc.) as properties and removes these elements from the vector.

      • Optionaldefaults: Properties

        Default values for the new Properties object. 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.

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

      Returns StringSeq

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

    • Gets an Ice property by key.

      Parameters

      • key: string

        The property key.

      Returns string

      The property value, or the default value for this property if the property is not set.

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

    • Gets an Ice property as an integer.

      Parameters

      • key: string

        The property key.

      Returns number

      The property value interpreted as an integer, or the default value if the property is not set.

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

    • Gets an Ice property as a list of strings. The strings must be separated by whitespace or comma. The strings in the list can contain whitespace and commas if they are enclosed in single or double quotes. If quotes are mismatched, the default list is returned. Within single quotes or double quotes, you can escape the quote in question with a backslash, e.g. 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.

    • Gets all properties whose keys begin with prefix. If prefix is the empty string, then all properties are returned.

      Parameters

      • prefix: string

        The prefix to search for.

      Returns PropertyDict

      The matching property set.

    • Gets a property by key.

      Parameters

      • key: string

        The property key.

      Returns string

      The property value, or the empty string if the property is not set.

    • Gets a property as an integer.

      Parameters

      • key: string

        The property key.

      Returns number

      The property value interpreted as an integer, or 0 if the property is not set.

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

    • Gets a property as an integer.

      Parameters

      • key: string

        The property key.

      • value: number

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

      Returns number

      The property value interpreted as an integer, or the default value if the property is not set.

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

    • Gets a property as a list of strings. The strings must be separated by whitespace or comma. 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 quotes or double quotes, you can escape the quote in question with a backslash, e.g. 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, or an empty list if the property is not set.

    • 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.

    • Gets a property by key.

      Parameters

      • key: string

        The property key.

      • value: string

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

      Returns string

      The property value or the default value if the property is not set.

    • 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 start 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 the empty string to convert all options starting with --.

      • options: StringSeq

        The command-line options.

      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 start with one of the reserved Ice prefixes (--Ice, --IceSSL, etc.) are converted into properties.

      Parameters

      Returns StringSeq

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

    • Sets a property. To unset a property, set it to the empty string.

      Parameters

      • key: string

        The property key.

      • value: string

        The property value.

      Returns void