Class Header

    • Method Detail

      • ofClassification

        public static Header ofClassification​(String value)
        Creates a 'Classification' header.

        The Classification header enables a sender or other entity to classify a stanza according to some classification scheme.

        Parameters:
        value - The value.
        Returns:
        The 'Classification' header.
        See Also:
        5.1 Classification
      • ofCreated

        public static Header ofCreated​(OffsetDateTime dateTime)
        Creates a header which specifies the date and time when a stanza was created by the originating entity.
        Parameters:
        dateTime - The date time.
        Returns:
        The 'Created' header.
        See Also:
        5.2 Created
      • ofDistribute

        public static Header ofDistribute​(boolean distribute)
        The Distribute header enables a sender to specify whether the stanza may be further distributed by the recipient to other entities on the network. The allowable values for this header are "true" and "false". If the sender specifies a value of "false", the recipient MUST NOT further distribute the stanza or any information contained therein; if the sender specifies a value of "true", the recipient MAY further distribute the stanza or any information contained therein; if the value is anything other than "true" or "false" and the recipient does not understand the value, the recipient MUST assume the default value of "false".
        Parameters:
        distribute - If the stanza may be further distributed by the recipient.
        Returns:
        The header.
        See Also:
        5.3 Distribute
      • ofStore

        public static Header ofStore​(boolean store)
        The Store header enables a sender to specify whether the stanza may be stored or archived by the recipient.
        Parameters:
        store - If the stanza may be stored by the recipient.
        Returns:
        The header.
        See Also:
        5.4 Store
      • ofTimeToLive

        public static Header ofTimeToLive​(Duration timeToLive)
        Specifies that the information contained in a stanza is valid only for a limited period of time.
        Parameters:
        timeToLive - The time to live.
        Returns:
        The header.
        See Also:
        5.5 TTL
      • ofUrgency

        public static Header ofUrgency​(String urgency)
        Specifies that the information contained in a stanza is more or less time-sensitive.
        Parameters:
        urgency - The urgency, must be "high", "medium" or "low".
        Returns:
        The header.
        See Also:
        5.6 Urgency
      • getName

        public final String getName()
        Gets the name of the header.
        Returns:
        The header.
      • getValue

        public final String getValue()
        Gets the value of the header.
        Returns:
        The header.