Class StreamFeature

    • Constructor Detail

      • StreamFeature

        public StreamFeature()
    • Method Detail

      • isMandatory

        public boolean isMandatory()
        Indicates, whether this feature is mandatory to negotiate. By default a feature is not mandatory. Override this method for mandatory-to-negotiate features.
        True, if the feature is mandatory.
      • getPriority

        public int getPriority()
        Gets the priority of the feature, i.e. when it will be negotiated during feature negotiation.
        The priority.
      • requiresRestart

        public boolean requiresRestart()
        If this feature requires a stream restart after it has been negotiated.
        True, if a stream restart is required.
      • compareTo

        public final int compareTo​(StreamFeature o)
        Compares two features by their priority and mandatory-to-negotiate flag.

        4.3.2. Stream Features Format

        A <features/> element that contains both mandatory-to-negotiate and voluntary-to-negotiate features indicates that the negotiation is not complete but that the initiating entity MAY complete the voluntary-to-negotiate feature(s) before it attempts to negotiate the mandatory-to-negotiate feature(s).

        Specified by:
        compareTo in interface Comparable<StreamFeature>
        o - The other feature.
        The comparison result.
        See Also:
        XEP-0170: Recommended Order of Stream Feature Negotiation