Interface AocSubscriptionInformation

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface AocSubscriptionInformation
    extends GroupedAvp
    Defines an interface representing the AoC-Subscription-Information grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V10.0.0) specification:
     7.2.20  AoC-Subscription-Information AVP
     The AoC-Subscription-Information AVP (AVP code 2314) is of type Grouped and holds the subscription and formatting parameters received from HSS.
     It has the following ABNF grammar:
     
         AoC-Subscription-Information ::=  < AVP Header: 2314 >
                                             * [ AoC-Service ]
                                               [ AoC-Format ]
                                               [ Preferred-AoC-Currency ]
     
     
    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

      • getAocServices

        AocService[] getAocServices()
        Returns the set of AoC-Service AVPs. The returned array contains the AVPs in the order they appear in the AoC-Subscription-Information AVP. A return value of null implies that no AoC-Service AVPs have been set. The elements in the given array are AocService objects.
      • setAocService

        void setAocService​(AocService aocService)
        Sets a single AoC-Service AVP in the AoC-Subscription-Information AVP, of type Grouped.
        Throws:
        NullPointerException - if aocService is null.
      • setAocServices

        void setAocServices​(AocService[] aocServices)
        Sets the set of AoC-Service AVPs, with all the values in the given array. The AVPs will be added to the AoC-Subscription-Information 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 getAocServices() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if aocServices is null.
      • removeAocServices

        void removeAocServices()
        Removes all AoC-Service AVPs from the AoC-Subscription-Information AVP. If no AoC-Service AVPs are present, this method returns silently.
      • hasAocFormat

        boolean hasAocFormat()
        Returns true if the AoC-Format AVP is present in the AoC-Subscription-Information AVP.
      • getAocFormat

        AocFormat getAocFormat()
        Returns the value of the AoC-Format AVP, of type Enumerated.
        Returns:
        the value of the AoC-Format AVP, or null if it has not been set.
      • setAocFormat

        void setAocFormat​(AocFormat aocFormat)
        Sets the value of the AoC-Format AVP, of type Enumerated.
        Throws:
        NullPointerException - if aocFormat is null.
      • removeAocFormat

        void removeAocFormat()
        Removes the AoC-Format AVP from the AoC-Subscription-Information AVP. If the AoC-Format AVP is not present, this method returns silently.
      • hasPreferredAocCurrency

        boolean hasPreferredAocCurrency()
        Returns true if the Preferred-AoC-Currency AVP is present in the AoC-Subscription-Information AVP.
      • getPreferredAocCurrency

        long getPreferredAocCurrency()
        Returns the value of the Preferred-AoC-Currency AVP, of type Unsigned32. Use hasPreferredAocCurrency() to check the existence of this AVP.
        Returns:
        the value of the Preferred-AoC-Currency AVP
        Throws:
        IllegalStateException - if the Preferred-AoC-Currency AVP has not been set.
      • setPreferredAocCurrency

        void setPreferredAocCurrency​(long preferredAocCurrency)
        Sets the value of the Preferred-AoC-Currency AVP, of type Unsigned32.
      • removePreferredAocCurrency

        void removePreferredAocCurrency()
        Removes the Preferred-AoC-Currency AVP from the AoC-Subscription-Information AVP. If the Preferred-AoC-Currency 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 AoC-Subscription-Information 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 AoC-Subscription-Information 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 AoC-Subscription-Information AVP. If no extension AVPs are present, this method returns silently.