Interface GsuPoolReference

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface GsuPoolReference
    extends GroupedAvp
    Defines an interface representing the G-S-U-Pool-Reference grouped AVP type. From the Diameter Credit-Control Application (rfc4006.txt) specification:
     8.30.  G-S-U-Pool-Reference AVP
     
        The G-S-U-Pool-Reference AVP (AVP Code 457) is of type Grouped.  It
        is used in the Credit-Control-Answer message, and associates the
        Granted-Service-Unit AVP within which it appears with a credit pool
        within the session.
     
        The G-S-U-Pool-Identifier AVP specifies the credit pool from which
        credit is drawn for this unit type.
     
        The CC-Unit-Type AVP specifies the type of units for which credit is
        pooled.
     
        The Unit-Value AVP specifies the multiplier, which converts between
        service units of type CC-Unit-Type and abstract service units within
        the credit pool (and thus to service units of any other service or
        rating group associated with the same pool).
     
        The G-S-U-Pool-Reference AVP is defined as follows (per the grouped-
        avp-def of RFC 3588 [DIAMBASE]):
     
           G-S-U-Pool-Reference    ::= < AVP Header: 457 >
                                       { G-S-U-Pool-Identifier }
                                       { CC-Unit-Type }
                                       { Unit-Value }
     
    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

      • hasGsuPoolIdentifier

        boolean hasGsuPoolIdentifier()
        Returns true if the G-S-U-Pool-Identifier AVP is present in the G-S-U-Pool-Reference AVP.
      • getGsuPoolIdentifier

        long getGsuPoolIdentifier()
        Returns the value of the G-S-U-Pool-Identifier AVP, of type Unsigned32. Use hasGsuPoolIdentifier() to check the existence of this AVP.
        Returns:
        the value of the G-S-U-Pool-Identifier AVP
        Throws:
        IllegalStateException - if the G-S-U-Pool-Identifier AVP has not been set.
      • setGsuPoolIdentifier

        void setGsuPoolIdentifier​(long gsuPoolIdentifier)
        Sets the value of the G-S-U-Pool-Identifier AVP, of type Unsigned32.
      • removeGsuPoolIdentifier

        void removeGsuPoolIdentifier()
        Removes the G-S-U-Pool-Identifier AVP from the G-S-U-Pool-Reference AVP. If the G-S-U-Pool-Identifier AVP is not present, this method returns silently.
      • hasCcUnitType

        boolean hasCcUnitType()
        Returns true if the CC-Unit-Type AVP is present in the G-S-U-Pool-Reference AVP.
      • getCcUnitType

        CcUnitType getCcUnitType()
        Returns the value of the CC-Unit-Type AVP, of type Enumerated.
        Returns:
        the value of the CC-Unit-Type AVP, or null if it has not been set.
      • setCcUnitType

        void setCcUnitType​(CcUnitType ccUnitType)
        Sets the value of the CC-Unit-Type AVP, of type Enumerated.
        Throws:
        NullPointerException - if ccUnitType is null.
      • removeCcUnitType

        void removeCcUnitType()
        Removes the CC-Unit-Type AVP from the G-S-U-Pool-Reference AVP. If the CC-Unit-Type AVP is not present, this method returns silently.
      • hasUnitValue

        boolean hasUnitValue()
        Returns true if the Unit-Value AVP is present in the G-S-U-Pool-Reference AVP.
      • getUnitValue

        UnitValue getUnitValue()
        Returns the value of the Unit-Value AVP, of type Grouped.
        Returns:
        the value of the Unit-Value AVP, or null if it has not been set.
      • setUnitValue

        void setUnitValue​(UnitValue unitValue)
        Sets the value of the Unit-Value AVP, of type Grouped.
        Throws:
        NullPointerException - if unitValue is null.
      • removeUnitValue

        void removeUnitValue()
        Removes the Unit-Value AVP from the G-S-U-Pool-Reference AVP. If the Unit-Value 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 G-S-U-Pool-Reference 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 G-S-U-Pool-Reference 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 G-S-U-Pool-Reference AVP. If no extension AVPs are present, this method returns silently.