Interface TimeStamps

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface TimeStamps
    extends GroupedAvp
    Defines an interface representing the Time-Stamps grouped AVP type. From the Diameter Ro Reference Point Protocol Details (3GPP TS 32.299 V9.6.0) specification:
     7.2.231     Time-Stamps AVP
     
     The Time-Stamps AVP (AVP code 833) is of type Grouped and holds the time of
     the initial SIP request and the time of the response to the initial SIP
     Request.
     It has the following ABNF grammar:
     
           Time-Stamps ::=  < AVP Header: 833 >
                            [ SIP-Request-Timestamp ]
                            [ SIP-Response-Timestamp ]
                            [ SIP-Request-Timestamp-Fraction ]
                            [ SIP-Response-Timestamp-Fraction ]
     
    Note:
    The support for extension AVPs is present even thou the ABNF grammar for this AVP does not contain the "* [ AVP ]" line. Be aware that adding any extension AVPs may result in interoperability problems with products that strongly validate the incoming diameter message for it's adherence to the specification.
    • Method Detail

      • hasSipRequestTimestamp

        boolean hasSipRequestTimestamp()
        Returns true if the SIP-Request-Timestamp AVP is present in the Time-Stamps AVP.
      • getSipRequestTimestamp

        Date getSipRequestTimestamp()
        Returns the value of the SIP-Request-Timestamp AVP, of type Time.
        Returns:
        the value of the SIP-Request-Timestamp AVP, or null if it has not been set.
      • setSipRequestTimestamp

        void setSipRequestTimestamp​(Date sipRequestTimestamp)
        Sets the value of the SIP-Request-Timestamp AVP, of type Time.
        Throws:
        NullPointerException - if sipRequestTimestamp is null.
      • removeSipRequestTimestamp

        void removeSipRequestTimestamp()
        Removes the SIP-Request-Timestamp AVP from the Time-Stamps AVP. If the SIP-Request-Timestamp AVP is not present, this method returns silently.
      • hasSipResponseTimestamp

        boolean hasSipResponseTimestamp()
        Returns true if the SIP-Response-Timestamp AVP is present in the Time-Stamps AVP.
      • getSipResponseTimestamp

        Date getSipResponseTimestamp()
        Returns the value of the SIP-Response-Timestamp AVP, of type Time.
        Returns:
        the value of the SIP-Response-Timestamp AVP, or null if it has not been set.
      • setSipResponseTimestamp

        void setSipResponseTimestamp​(Date sipResponseTimestamp)
        Sets the value of the SIP-Response-Timestamp AVP, of type Time.
        Throws:
        NullPointerException - if sipResponseTimestamp is null.
      • removeSipResponseTimestamp

        void removeSipResponseTimestamp()
        Removes the SIP-Response-Timestamp AVP from the Time-Stamps AVP. If the SIP-Response-Timestamp AVP is not present, this method returns silently.
      • hasSipRequestTimestampFraction

        boolean hasSipRequestTimestampFraction()
        Returns true if the SIP-Request-Timestamp-Fraction AVP is present in the Time-Stamps AVP.
      • getSipRequestTimestampFraction

        long getSipRequestTimestampFraction()
        Returns the value of the SIP-Request-Timestamp-Fraction AVP, of type Unsigned32. Use hasSipRequestTimestampFraction() to check the existence of this AVP.
        Returns:
        the value of the SIP-Request-Timestamp-Fraction AVP
        Throws:
        IllegalStateException - if the SIP-Request-Timestamp-Fraction AVP has not been set.
      • setSipRequestTimestampFraction

        void setSipRequestTimestampFraction​(long sipRequestTimestampFraction)
        Sets the value of the SIP-Request-Timestamp-Fraction AVP, of type Unsigned32.
      • removeSipRequestTimestampFraction

        void removeSipRequestTimestampFraction()
        Removes the SIP-Request-Timestamp-Fraction AVP from the Time-Stamps AVP. If the SIP-Request-Timestamp-Fraction AVP is not present, this method returns silently.
      • hasSipResponseTimestampFraction

        boolean hasSipResponseTimestampFraction()
        Returns true if the SIP-Response-Timestamp-Fraction AVP is present in the Time-Stamps AVP.
      • getSipResponseTimestampFraction

        long getSipResponseTimestampFraction()
        Returns the value of the SIP-Response-Timestamp-Fraction AVP, of type Unsigned32. Use hasSipResponseTimestampFraction() to check the existence of this AVP.
        Returns:
        the value of the SIP-Response-Timestamp-Fraction AVP
        Throws:
        IllegalStateException - if the SIP-Response-Timestamp-Fraction AVP has not been set.
      • setSipResponseTimestampFraction

        void setSipResponseTimestampFraction​(long sipResponseTimestampFraction)
        Sets the value of the SIP-Response-Timestamp-Fraction AVP, of type Unsigned32.
      • removeSipResponseTimestampFraction

        void removeSipResponseTimestampFraction()
        Removes the SIP-Response-Timestamp-Fraction AVP from the Time-Stamps AVP. If the SIP-Response-Timestamp-Fraction AVP is not present, this method returns silently.
      • getExtensionAvps

        DiameterAvp[] getExtensionAvps()
        Returns the set of extension AVPs. The returned array contains the extension AVPs in the order they appear in the Time-Stamps AVP. A return value of null implies that no extensions AVPs have been set.
      • setExtensionAvps

        void setExtensionAvps​(DiameterAvp[] avps)
                       throws AvpNotAllowedException
        Sets the set of extension AVPs with all the values in the given array. The AVPs will be added to Time-Stamps AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getExtensionAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        AvpNotAllowedException - if an AVP is encountered of a type already known to this class (i.e. an AVP for which get/set methods already appear in this class)
        NullPointerException - if avps is null.
      • removeExtensionAvps

        void removeExtensionAvps()
        Removes all extension AVPs from the Time-Stamps AVP. If no extension AVPs are present, this method returns silently.