Interface ServiceDataContainer

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface ServiceDataContainer
    extends GroupedAvp
    Defines an interface representing the Service-Data-Container grouped AVP type. From the Diameter Ro Reference Point Protocol Details (3GPP TS 32.299 V9.6.0) specification:
     7.2.189            Service-Data-Container AVP
     
     The Service-Data-Container AVP (AVP code 2040) is of type Grouped. Its purpose is to allow the transmission of the container 
     to be reported for Flow based Charging. On encountering change on charging condition, this container identifies 
     the volume count (separated for uplink and downlink), elapsed time or number of events, per service data flow identified 
     per rating group or combination of the rating group and service id within an  IP-CAN bearer.
     It has the following ABNF grammar:
     
         Service-Data-Container ::=  < AVP Header: 2040>
                                     [ AF-Correlation-Information ]
                                     [ Charging-Rule-Base-Name ]
                                     [ Accounting-Input-Octets ]
                                     [ Accounting-Output-Octets ]
                                     [ Accounting-Input-Packets ]   
                                     [ Accounting-Output-Packets ]
                                     [ Local-Sequence-Number ]
                                     [ QoS-Information ]
                                     [ Rating-Group ] 
                                     [ Change-Time ] 
                                     [ Service-Identifier ] 
                                     [ Service-Specific-Info ] 
                                     [ SGSN-Address ] 
                                     [ Time-First-Usage ]
                                     [ Time-Last-Usage ]
                                     [ Time-Usage ]
                                   * [ Change-Condition]
                                     [ TGPP-User-Location-Info ]
                                     [ TGPP2-BSID ]
     
    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

      • hasAfCorrelationInformation

        boolean hasAfCorrelationInformation()
        Returns true if the AF-Correlation-Information AVP is present in the Service-Data-Container AVP.
      • getAfCorrelationInformation

        AfCorrelationInformation getAfCorrelationInformation()
        Returns the value of the AF-Correlation-Information AVP, of type Grouped.
        Returns:
        the value of the AF-Correlation-Information AVP, or null if it has not been set.
      • setAfCorrelationInformation

        void setAfCorrelationInformation​(AfCorrelationInformation afCorrelationInformation)
        Sets the value of the AF-Correlation-Information AVP, of type Grouped.
        Throws:
        NullPointerException - if afCorrelationInformation is null.
      • removeAfCorrelationInformation

        void removeAfCorrelationInformation()
        Removes the AF-Correlation-Information AVP from the Service-Data-Container AVP. If the AF-Correlation-Information AVP is not present, this method returns silently.
      • hasChargingRuleBaseName

        boolean hasChargingRuleBaseName()
        Returns true if the Charging-Rule-Base-Name AVP is present in the Service-Data-Container AVP.
      • getChargingRuleBaseName

        byte[] getChargingRuleBaseName()
        Returns the value of the Charging-Rule-Base-Name AVP, of type OctetString.
        Returns:
        the value of the Charging-Rule-Base-Name AVP, or null if it has not been set.
      • setChargingRuleBaseName

        void setChargingRuleBaseName​(byte[] chargingRuleBaseName)
        Sets the value of the Charging-Rule-Base-Name AVP, of type OctetString.
        Throws:
        NullPointerException - if chargingRuleBaseName is null.
      • removeChargingRuleBaseName

        void removeChargingRuleBaseName()
        Removes the Charging-Rule-Base-Name AVP from the Service-Data-Container AVP. If the Charging-Rule-Base-Name AVP is not present, this method returns silently.
      • hasAccountingInputOctets

        boolean hasAccountingInputOctets()
        Returns true if the Accounting-Input-Octets AVP is present in the Service-Data-Container AVP.
      • getAccountingInputOctets

        long getAccountingInputOctets()
        Returns the value of the Accounting-Input-Octets AVP, of type Unsigned64. Use hasAccountingInputOctets() to check the existence of this AVP.
        Returns:
        the value of the Accounting-Input-Octets AVP
        Throws:
        IllegalStateException - if the Accounting-Input-Octets AVP has not been set.
      • setAccountingInputOctets

        void setAccountingInputOctets​(long accountingInputOctets)
        Sets the value of the Accounting-Input-Octets AVP, of type Unsigned64.
      • removeAccountingInputOctets

        void removeAccountingInputOctets()
        Removes the Accounting-Input-Octets AVP from the Service-Data-Container AVP. If the Accounting-Input-Octets AVP is not present, this method returns silently.
      • hasAccountingOutputOctets

        boolean hasAccountingOutputOctets()
        Returns true if the Accounting-Output-Octets AVP is present in the Service-Data-Container AVP.
      • getAccountingOutputOctets

        long getAccountingOutputOctets()
        Returns the value of the Accounting-Output-Octets AVP, of type Unsigned64. Use hasAccountingOutputOctets() to check the existence of this AVP.
        Returns:
        the value of the Accounting-Output-Octets AVP
        Throws:
        IllegalStateException - if the Accounting-Output-Octets AVP has not been set.
      • setAccountingOutputOctets

        void setAccountingOutputOctets​(long accountingOutputOctets)
        Sets the value of the Accounting-Output-Octets AVP, of type Unsigned64.
      • removeAccountingOutputOctets

        void removeAccountingOutputOctets()
        Removes the Accounting-Output-Octets AVP from the Service-Data-Container AVP. If the Accounting-Output-Octets AVP is not present, this method returns silently.
      • hasAccountingInputPackets

        boolean hasAccountingInputPackets()
        Returns true if the Accounting-Input-Packets AVP is present in the Service-Data-Container AVP.
      • getAccountingInputPackets

        long getAccountingInputPackets()
        Returns the value of the Accounting-Input-Packets AVP, of type Unsigned64. Use hasAccountingInputPackets() to check the existence of this AVP.
        Returns:
        the value of the Accounting-Input-Packets AVP
        Throws:
        IllegalStateException - if the Accounting-Input-Packets AVP has not been set.
      • setAccountingInputPackets

        void setAccountingInputPackets​(long accountingInputPackets)
        Sets the value of the Accounting-Input-Packets AVP, of type Unsigned64.
      • removeAccountingInputPackets

        void removeAccountingInputPackets()
        Removes the Accounting-Input-Packets AVP from the Service-Data-Container AVP. If the Accounting-Input-Packets AVP is not present, this method returns silently.
      • hasAccountingOutputPackets

        boolean hasAccountingOutputPackets()
        Returns true if the Accounting-Output-Packets AVP is present in the Service-Data-Container AVP.
      • getAccountingOutputPackets

        long getAccountingOutputPackets()
        Returns the value of the Accounting-Output-Packets AVP, of type Unsigned64. Use hasAccountingOutputPackets() to check the existence of this AVP.
        Returns:
        the value of the Accounting-Output-Packets AVP
        Throws:
        IllegalStateException - if the Accounting-Output-Packets AVP has not been set.
      • setAccountingOutputPackets

        void setAccountingOutputPackets​(long accountingOutputPackets)
        Sets the value of the Accounting-Output-Packets AVP, of type Unsigned64.
      • removeAccountingOutputPackets

        void removeAccountingOutputPackets()
        Removes the Accounting-Output-Packets AVP from the Service-Data-Container AVP. If the Accounting-Output-Packets AVP is not present, this method returns silently.
      • hasLocalSequenceNumber

        boolean hasLocalSequenceNumber()
        Returns true if the Local-Sequence-Number AVP is present in the Service-Data-Container AVP.
      • getLocalSequenceNumber

        long getLocalSequenceNumber()
        Returns the value of the Local-Sequence-Number AVP, of type Unsigned32. Use hasLocalSequenceNumber() to check the existence of this AVP.
        Returns:
        the value of the Local-Sequence-Number AVP
        Throws:
        IllegalStateException - if the Local-Sequence-Number AVP has not been set.
      • setLocalSequenceNumber

        void setLocalSequenceNumber​(long localSequenceNumber)
        Sets the value of the Local-Sequence-Number AVP, of type Unsigned32.
      • removeLocalSequenceNumber

        void removeLocalSequenceNumber()
        Removes the Local-Sequence-Number AVP from the Service-Data-Container AVP. If the Local-Sequence-Number AVP is not present, this method returns silently.
      • hasQosInformation

        boolean hasQosInformation()
        Returns true if the QoS-Information AVP is present in the Service-Data-Container AVP.
      • getQosInformation

        QosInformation getQosInformation()
        Returns the value of the QoS-Information AVP, of type Grouped.
        Returns:
        the value of the QoS-Information AVP, or null if it has not been set.
      • setQosInformation

        void setQosInformation​(QosInformation qosInformation)
        Sets the value of the QoS-Information AVP, of type Grouped.
        Throws:
        NullPointerException - if qosInformation is null.
      • removeQosInformation

        void removeQosInformation()
        Removes the QoS-Information AVP from the Service-Data-Container AVP. If the QoS-Information AVP is not present, this method returns silently.
      • hasRatingGroup

        boolean hasRatingGroup()
        Returns true if the Rating-Group AVP is present in the Service-Data-Container AVP.
      • getRatingGroup

        long getRatingGroup()
        Returns the value of the Rating-Group AVP, of type Unsigned32. Use hasRatingGroup() to check the existence of this AVP.
        Returns:
        the value of the Rating-Group AVP
        Throws:
        IllegalStateException - if the Rating-Group AVP has not been set.
      • setRatingGroup

        void setRatingGroup​(long ratingGroup)
        Sets the value of the Rating-Group AVP, of type Unsigned32.
      • removeRatingGroup

        void removeRatingGroup()
        Removes the Rating-Group AVP from the Service-Data-Container AVP. If the Rating-Group AVP is not present, this method returns silently.
      • hasChangeTime

        boolean hasChangeTime()
        Returns true if the Change-Time AVP is present in the Service-Data-Container AVP.
      • getChangeTime

        Date getChangeTime()
        Returns the value of the Change-Time AVP, of type Time.
        Returns:
        the value of the Change-Time AVP, or null if it has not been set.
      • setChangeTime

        void setChangeTime​(Date changeTime)
        Sets the value of the Change-Time AVP, of type Time.
        Throws:
        NullPointerException - if changeTime is null.
      • removeChangeTime

        void removeChangeTime()
        Removes the Change-Time AVP from the Service-Data-Container AVP. If the Change-Time AVP is not present, this method returns silently.
      • hasServiceIdentifier

        boolean hasServiceIdentifier()
        Returns true if the Service-Identifier AVP is present in the Service-Data-Container AVP.
      • getServiceIdentifier

        long getServiceIdentifier()
        Returns the value of the Service-Identifier AVP, of type Unsigned32. Use hasServiceIdentifier() to check the existence of this AVP.
        Returns:
        the value of the Service-Identifier AVP
        Throws:
        IllegalStateException - if the Service-Identifier AVP has not been set.
      • setServiceIdentifier

        void setServiceIdentifier​(long serviceIdentifier)
        Sets the value of the Service-Identifier AVP, of type Unsigned32.
      • removeServiceIdentifier

        void removeServiceIdentifier()
        Removes the Service-Identifier AVP from the Service-Data-Container AVP. If the Service-Identifier AVP is not present, this method returns silently.
      • hasServiceSpecificInfo

        boolean hasServiceSpecificInfo()
        Returns true if the Service-Specific-Info AVP is present in the Service-Data-Container AVP.
      • getServiceSpecificInfo

        ServiceSpecificInfo getServiceSpecificInfo()
        Returns the value of the Service-Specific-Info AVP, of type Grouped.
        Returns:
        the value of the Service-Specific-Info AVP, or null if it has not been set.
      • setServiceSpecificInfo

        void setServiceSpecificInfo​(ServiceSpecificInfo serviceSpecificInfo)
        Sets the value of the Service-Specific-Info AVP, of type Grouped.
        Throws:
        NullPointerException - if serviceSpecificInfo is null.
      • removeServiceSpecificInfo

        void removeServiceSpecificInfo()
        Removes the Service-Specific-Info AVP from the Service-Data-Container AVP. If the Service-Specific-Info AVP is not present, this method returns silently.
      • hasSgsnAddress

        boolean hasSgsnAddress()
        Returns true if the SGSN-Address AVP is present in the Service-Data-Container AVP.
      • getSgsnAddress

        Address getSgsnAddress()
        Returns the value of the SGSN-Address AVP, of type Address.
        Returns:
        the value of the SGSN-Address AVP, or null if it has not been set.
      • setSgsnAddress

        void setSgsnAddress​(Address sgsnAddress)
        Sets the value of the SGSN-Address AVP, of type Address.
        Throws:
        NullPointerException - if sgsnAddress is null.
      • removeSgsnAddress

        void removeSgsnAddress()
        Removes the SGSN-Address AVP from the Service-Data-Container AVP. If the SGSN-Address AVP is not present, this method returns silently.
      • hasTimeFirstUsage

        boolean hasTimeFirstUsage()
        Returns true if the Time-First-Usage AVP is present in the Service-Data-Container AVP.
      • getTimeFirstUsage

        Date getTimeFirstUsage()
        Returns the value of the Time-First-Usage AVP, of type Time.
        Returns:
        the value of the Time-First-Usage AVP, or null if it has not been set.
      • setTimeFirstUsage

        void setTimeFirstUsage​(Date timeFirstUsage)
        Sets the value of the Time-First-Usage AVP, of type Time.
        Throws:
        NullPointerException - if timeFirstUsage is null.
      • removeTimeFirstUsage

        void removeTimeFirstUsage()
        Removes the Time-First-Usage AVP from the Service-Data-Container AVP. If the Time-First-Usage AVP is not present, this method returns silently.
      • hasTimeLastUsage

        boolean hasTimeLastUsage()
        Returns true if the Time-Last-Usage AVP is present in the Service-Data-Container AVP.
      • getTimeLastUsage

        Date getTimeLastUsage()
        Returns the value of the Time-Last-Usage AVP, of type Time.
        Returns:
        the value of the Time-Last-Usage AVP, or null if it has not been set.
      • setTimeLastUsage

        void setTimeLastUsage​(Date timeLastUsage)
        Sets the value of the Time-Last-Usage AVP, of type Time.
        Throws:
        NullPointerException - if timeLastUsage is null.
      • removeTimeLastUsage

        void removeTimeLastUsage()
        Removes the Time-Last-Usage AVP from the Service-Data-Container AVP. If the Time-Last-Usage AVP is not present, this method returns silently.
      • hasTimeUsage

        boolean hasTimeUsage()
        Returns true if the Time-Usage AVP is present in the Service-Data-Container AVP.
      • getTimeUsage

        long getTimeUsage()
        Returns the value of the Time-Usage AVP, of type Unsigned32. Use hasTimeUsage() to check the existence of this AVP.
        Returns:
        the value of the Time-Usage AVP
        Throws:
        IllegalStateException - if the Time-Usage AVP has not been set.
      • setTimeUsage

        void setTimeUsage​(long timeUsage)
        Sets the value of the Time-Usage AVP, of type Unsigned32.
      • removeTimeUsage

        void removeTimeUsage()
        Removes the Time-Usage AVP from the Service-Data-Container AVP. If the Time-Usage AVP is not present, this method returns silently.
      • getChangeConditions

        int[] getChangeConditions()
        Returns the set of Change-Condition AVPs. The returned array contains the AVPs in the order they appear in the Service-Data-Container AVP. A return value of null implies that no Change-Condition AVPs have been set. The elements in the given array are int objects.
      • setChangeCondition

        void setChangeCondition​(int changeCondition)
        Sets a single Change-Condition AVP in the Service-Data-Container AVP, of type Integer32.
      • setChangeConditions

        void setChangeConditions​(int[] changeConditions)
        Sets the set of Change-Condition AVPs, with all the values in the given array. The AVPs will be added to the Service-Data-Container 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 getChangeConditions() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if changeConditions is null.
      • removeChangeConditions

        void removeChangeConditions()
        Removes all Change-Condition AVPs from the Service-Data-Container AVP. If no Change-Condition AVPs are present, this method returns silently.
      • hasTgppUserLocationInfo

        boolean hasTgppUserLocationInfo()
        Returns true if the TGPP-User-Location-Info AVP is present in the Service-Data-Container AVP.
      • getTgppUserLocationInfo

        byte[] getTgppUserLocationInfo()
        Returns the value of the TGPP-User-Location-Info AVP, of type OctetString.
        Returns:
        the value of the TGPP-User-Location-Info AVP, or null if it has not been set.
      • setTgppUserLocationInfo

        void setTgppUserLocationInfo​(byte[] tgppUserLocationInfo)
        Sets the value of the TGPP-User-Location-Info AVP, of type OctetString.
        Throws:
        NullPointerException - if tgppUserLocationInfo is null.
      • removeTgppUserLocationInfo

        void removeTgppUserLocationInfo()
        Removes the TGPP-User-Location-Info AVP from the Service-Data-Container AVP. If the TGPP-User-Location-Info AVP is not present, this method returns silently.
      • hasTgpp2Bsid

        boolean hasTgpp2Bsid()
        Returns true if the TGPP2-BSID AVP is present in the Service-Data-Container AVP.
      • getTgpp2Bsid

        String getTgpp2Bsid()
        Returns the value of the TGPP2-BSID AVP, of type UTF8String.
        Returns:
        the value of the TGPP2-BSID AVP, or null if it has not been set.
      • setTgpp2Bsid

        void setTgpp2Bsid​(String tgpp2Bsid)
        Sets the value of the TGPP2-BSID AVP, of type UTF8String.
        Throws:
        NullPointerException - if tgpp2Bsid is null.
      • removeTgpp2Bsid

        void removeTgpp2Bsid()
        Removes the TGPP2-BSID AVP from the Service-Data-Container AVP. If the TGPP2-BSID 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 Service-Data-Container 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 Service-Data-Container 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 Service-Data-Container AVP. If no extension AVPs are present, this method returns silently.