Interface TimeQuotaMechanism

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface TimeQuotaMechanism
    extends GroupedAvp
    Defines an interface representing the Time-Quota-Mechanism grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V8.13.0) specification:
     7.2.170     Time-Quota-Mechanism
     
     The Time-Quota-Mechanism AVP (AVP code 1270) is of type Grouped.
     It has the following syntax:
     
         Time-Quota-Mechanism ::= < AVP Header: 1270> 
                                     { Time-Quota-Type }
                                     { Base-Time-Interval }
     The OCS may include this AVP in an Multiple-Services-Credit-Control AVP, when granting time quota.
     
     
    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

      • hasTimeQuotaType

        boolean hasTimeQuotaType()
        Returns true if the Time-Quota-Type AVP is present in the Time-Quota-Mechanism AVP.
      • getTimeQuotaType

        TimeQuotaType getTimeQuotaType()
        Returns the value of the Time-Quota-Type AVP, of type Enumerated.
        Returns:
        the value of the Time-Quota-Type AVP, or null if it has not been set.
      • setTimeQuotaType

        void setTimeQuotaType​(TimeQuotaType timeQuotaType)
        Sets the value of the Time-Quota-Type AVP, of type Enumerated.
        Throws:
        NullPointerException - if timeQuotaType is null.
      • removeTimeQuotaType

        void removeTimeQuotaType()
        Removes the Time-Quota-Type AVP from the Time-Quota-Mechanism AVP. If the Time-Quota-Type AVP is not present, this method returns silently.
      • hasBaseTimeInterval

        boolean hasBaseTimeInterval()
        Returns true if the Base-Time-Interval AVP is present in the Time-Quota-Mechanism AVP.
      • getBaseTimeInterval

        long getBaseTimeInterval()
        Returns the value of the Base-Time-Interval AVP, of type Unsigned32. Use hasBaseTimeInterval() to check the existence of this AVP.
        Returns:
        the value of the Base-Time-Interval AVP
        Throws:
        IllegalStateException - if the Base-Time-Interval AVP has not been set.
      • setBaseTimeInterval

        void setBaseTimeInterval​(long baseTimeInterval)
        Sets the value of the Base-Time-Interval AVP, of type Unsigned32.
      • removeBaseTimeInterval

        void removeBaseTimeInterval()
        Removes the Base-Time-Interval AVP from the Time-Quota-Mechanism AVP. If the Base-Time-Interval 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-Quota-Mechanism 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-Quota-Mechanism 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-Quota-Mechanism AVP. If no extension AVPs are present, this method returns silently.