Interface UsageMonitoringInformation

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface UsageMonitoringInformation
    extends GroupedAvp
    Defines an interface representing the Usage-Monitoring-Information grouped AVP type. From the Diameter Gx Reference Point Protocol Details (3GPP TS 29.212 V11.9.0) specification:
     5.3.60 Usage-Monitoring-Information AVP
     
         The Usage-Monitoring-Information AVP (AVP code 1067) is of type Grouped, and it contains the usage monitoring
         control information.
     
         The Monitoring-Key AVP identifies the usage monitoring control instance.
         The Granted-Service-Unit AVP shall be used by the PCRF to provide the threshold level to the PCEF. The CC-Total-
         Octets AVP shall be used for providing threshold level for the total volume, or the CC-Input-Octets and/or CC-Output-
         Octets AVPs shall be used for providing threshold level for the uplink volume and/or the downlink volume. Monitoring-Time AVP shall be used for providing the time at which the PCEF shall reapply the threshold value provided by the PCRF.
         The Used-Service-Unit AVP shall be used by the PCEF to provide the measured usage to the PCRF. Reporting shall be
         done, as requested by the PCRF, in CC-Total-Octets, CC-Input-Octets or CC-Output-Octets AVPs of Used-Service-
         Unit AVP. Monitoring-Time AVP shall be used to indicate the time at which the PCEF shall reapply the threshold value provided by the PCRF.
     
         The Usage-Monitoring-Level AVP determines the scope of the usage monitoring instance.
         The Usage-Monitoring-Report AVP determines if accumulated usage shall be reported for the usage monitoring key
         included in Monitoring-Key AVP.
         The Usage-Monitoring-Support AVP determines if a usage monitoring instance is disabled.
     
         AVP Format:
     
         Usage-Monitoring-Information::= < AVP Header: 1067 >
                                         [ Monitoring-Key ]
                                      0*2[ Granted-Service-Unit ]
                                      0*2[ Used-Service-Unit ]
                                         [ Usage-Monitoring-Level ]
                                         [ Usage-Monitoring-Report ]
                                         [ Usage-Monitoring-Support ]
                                        *[ AVP ]
     
     
    • Method Detail

      • hasMonitoringKey

        boolean hasMonitoringKey()
        Returns true if the Monitoring-Key AVP is present in the Usage-Monitoring-Information AVP.
      • getMonitoringKey

        byte[] getMonitoringKey()
        Returns the value of the Monitoring-Key AVP, of type OctetString.
        Returns:
        the value of the Monitoring-Key AVP, or null if it has not been set.
      • setMonitoringKey

        void setMonitoringKey​(byte[] monitoringKey)
        Sets the value of the Monitoring-Key AVP, of type OctetString.
        Throws:
        NullPointerException - if monitoringKey is null.
      • removeMonitoringKey

        void removeMonitoringKey()
        Removes the Monitoring-Key AVP from the Usage-Monitoring-Information AVP. If the Monitoring-Key AVP is not present, this method returns silently.
      • getGrantedServiceUnits

        GrantedServiceUnit[] getGrantedServiceUnits()
        Returns the set of Granted-Service-Unit AVPs. The returned array contains the AVPs in the order they appear in the Usage-Monitoring-Information AVP. A return value of null implies that no Granted-Service-Unit AVPs have been set. The elements in the given array are GrantedServiceUnit objects.
      • setGrantedServiceUnit

        void setGrantedServiceUnit​(GrantedServiceUnit grantedServiceUnit)
        Sets a single Granted-Service-Unit AVP in the Usage-Monitoring-Information AVP, of type Grouped.
        Throws:
        NullPointerException - if grantedServiceUnit is null.
      • setGrantedServiceUnits

        void setGrantedServiceUnits​(GrantedServiceUnit[] grantedServiceUnits)
        Sets the set of Granted-Service-Unit AVPs, with all the values in the given array. The AVPs will be added to the Usage-Monitoring-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 getGrantedServiceUnits() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if grantedServiceUnits is null.
      • removeGrantedServiceUnits

        void removeGrantedServiceUnits()
        Removes all Granted-Service-Unit AVPs from the Usage-Monitoring-Information AVP. If no Granted-Service-Unit AVPs are present, this method returns silently.
      • getUsedServiceUnits

        UsedServiceUnit[] getUsedServiceUnits()
        Returns the set of Used-Service-Unit AVPs. The returned array contains the AVPs in the order they appear in the Usage-Monitoring-Information AVP. A return value of null implies that no Used-Service-Unit AVPs have been set. The elements in the given array are UsedServiceUnit objects.
      • setUsedServiceUnit

        void setUsedServiceUnit​(UsedServiceUnit usedServiceUnit)
        Sets a single Used-Service-Unit AVP in the Usage-Monitoring-Information AVP, of type Grouped.
        Throws:
        NullPointerException - if usedServiceUnit is null.
      • setUsedServiceUnits

        void setUsedServiceUnits​(UsedServiceUnit[] usedServiceUnits)
        Sets the set of Used-Service-Unit AVPs, with all the values in the given array. The AVPs will be added to the Usage-Monitoring-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 getUsedServiceUnits() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if usedServiceUnits is null.
      • removeUsedServiceUnits

        void removeUsedServiceUnits()
        Removes all Used-Service-Unit AVPs from the Usage-Monitoring-Information AVP. If no Used-Service-Unit AVPs are present, this method returns silently.
      • hasUsageMonitoringLevel

        boolean hasUsageMonitoringLevel()
        Returns true if the Usage-Monitoring-Level AVP is present in the Usage-Monitoring-Information AVP.
      • getUsageMonitoringLevel

        UsageMonitoringLevel getUsageMonitoringLevel()
        Returns the value of the Usage-Monitoring-Level AVP, of type Enumerated.
        Returns:
        the value of the Usage-Monitoring-Level AVP, or null if it has not been set.
      • setUsageMonitoringLevel

        void setUsageMonitoringLevel​(UsageMonitoringLevel usageMonitoringLevel)
        Sets the value of the Usage-Monitoring-Level AVP, of type Enumerated.
        Throws:
        NullPointerException - if usageMonitoringLevel is null.
      • removeUsageMonitoringLevel

        void removeUsageMonitoringLevel()
        Removes the Usage-Monitoring-Level AVP from the Usage-Monitoring-Information AVP. If the Usage-Monitoring-Level AVP is not present, this method returns silently.
      • hasUsageMonitoringReport

        boolean hasUsageMonitoringReport()
        Returns true if the Usage-Monitoring-Report AVP is present in the Usage-Monitoring-Information AVP.
      • getUsageMonitoringReport

        UsageMonitoringReport getUsageMonitoringReport()
        Returns the value of the Usage-Monitoring-Report AVP, of type Enumerated.
        Returns:
        the value of the Usage-Monitoring-Report AVP, or null if it has not been set.
      • setUsageMonitoringReport

        void setUsageMonitoringReport​(UsageMonitoringReport usageMonitoringReport)
        Sets the value of the Usage-Monitoring-Report AVP, of type Enumerated.
        Throws:
        NullPointerException - if usageMonitoringReport is null.
      • removeUsageMonitoringReport

        void removeUsageMonitoringReport()
        Removes the Usage-Monitoring-Report AVP from the Usage-Monitoring-Information AVP. If the Usage-Monitoring-Report AVP is not present, this method returns silently.
      • hasUsageMonitoringSupport

        boolean hasUsageMonitoringSupport()
        Returns true if the Usage-Monitoring-Support AVP is present in the Usage-Monitoring-Information AVP.
      • getUsageMonitoringSupport

        UsageMonitoringSupport getUsageMonitoringSupport()
        Returns the value of the Usage-Monitoring-Support AVP, of type Enumerated.
        Returns:
        the value of the Usage-Monitoring-Support AVP, or null if it has not been set.
      • setUsageMonitoringSupport

        void setUsageMonitoringSupport​(UsageMonitoringSupport usageMonitoringSupport)
        Sets the value of the Usage-Monitoring-Support AVP, of type Enumerated.
        Throws:
        NullPointerException - if usageMonitoringSupport is null.
      • removeUsageMonitoringSupport

        void removeUsageMonitoringSupport()
        Removes the Usage-Monitoring-Support AVP from the Usage-Monitoring-Information AVP. If the Usage-Monitoring-Support 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 Usage-Monitoring-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 Usage-Monitoring-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 Usage-Monitoring-Information AVP. If no extension AVPs are present, this method returns silently.