Interface OcOlr

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface OcOlr
    extends GroupedAvp
    Defines an interface representing the OC-OLR grouped AVP type. From the Diameter Gx Reference Point Protocol Details (3GPP TS 29.212 V11.9.0) specification:
     7.3.  OC-OLR AVP
     
        The OC-OLR AVP (AVP Code 623) is of type Grouped and contains the
        information necessary to convey an overload report on an overload
        condition at the reporting node.  The application the OC-OLR AVP
        applies to is identified by the Application-ID found in the Diameter
        message header.  The host or realm the OC-OLR AVP concerns is
        determined from the Origin-Host AVP and/or Origin-Realm AVP found in
        the encapsulating Diameter command.  The OC-OLR AVP is intended to be
        sent only by a reporting node.
     
           OC-OLR ::= < AVP Header: 623 >
                      < OC-Sequence-Number >
                      < OC-Report-Type >
                      [ OC-Reduction-Percentage ]
                      [ OC-Validity-Duration ]
                    * [ AVP ]
         From RFC 7683
     
     
     
    • Method Detail

      • hasOcSequenceNumber

        boolean hasOcSequenceNumber()
        Returns true if the OC-Sequence-Number AVP is present in the OC-OLR AVP.
      • getOcSequenceNumber

        long getOcSequenceNumber()
        Returns the value of the OC-Sequence-Number AVP, of type Unsigned64. Use hasOcSequenceNumber() to check the existence of this AVP.
        Returns:
        the value of the OC-Sequence-Number AVP
        Throws:
        IllegalStateException - if the OC-Sequence-Number AVP has not been set.
      • setOcSequenceNumber

        void setOcSequenceNumber​(long ocSequenceNumber)
        Sets the value of the OC-Sequence-Number AVP, of type Unsigned64.
      • removeOcSequenceNumber

        void removeOcSequenceNumber()
        Removes the OC-Sequence-Number AVP from the OC-OLR AVP. If the OC-Sequence-Number AVP is not present, this method returns silently.
      • hasOcReportType

        boolean hasOcReportType()
        Returns true if the OC-Report-Type AVP is present in the OC-OLR AVP.
      • getOcReportType

        OcReportType getOcReportType()
        Returns the value of the OC-Report-Type AVP, of type Enumerated.
        Returns:
        the value of the OC-Report-Type AVP, or null if it has not been set.
      • setOcReportType

        void setOcReportType​(OcReportType ocReportType)
        Sets the value of the OC-Report-Type AVP, of type Enumerated.
        Throws:
        NullPointerException - if ocReportType is null.
      • removeOcReportType

        void removeOcReportType()
        Removes the OC-Report-Type AVP from the OC-OLR AVP. If the OC-Report-Type AVP is not present, this method returns silently.
      • hasOcReductionPercentage

        boolean hasOcReductionPercentage()
        Returns true if the OC-Reduction-Percentage AVP is present in the OC-OLR AVP.
      • getOcReductionPercentage

        long getOcReductionPercentage()
        Returns the value of the OC-Reduction-Percentage AVP, of type Unsigned32. Use hasOcReductionPercentage() to check the existence of this AVP.
        Returns:
        the value of the OC-Reduction-Percentage AVP
        Throws:
        IllegalStateException - if the OC-Reduction-Percentage AVP has not been set.
      • setOcReductionPercentage

        void setOcReductionPercentage​(long ocReductionPercentage)
        Sets the value of the OC-Reduction-Percentage AVP, of type Unsigned32.
      • removeOcReductionPercentage

        void removeOcReductionPercentage()
        Removes the OC-Reduction-Percentage AVP from the OC-OLR AVP. If the OC-Reduction-Percentage AVP is not present, this method returns silently.
      • hasOcValidityDuration

        boolean hasOcValidityDuration()
        Returns true if the OC-Validity-Duration AVP is present in the OC-OLR AVP.
      • getOcValidityDuration

        long getOcValidityDuration()
        Returns the value of the OC-Validity-Duration AVP, of type Unsigned32. Use hasOcValidityDuration() to check the existence of this AVP.
        Returns:
        the value of the OC-Validity-Duration AVP
        Throws:
        IllegalStateException - if the OC-Validity-Duration AVP has not been set.
      • setOcValidityDuration

        void setOcValidityDuration​(long ocValidityDuration)
        Sets the value of the OC-Validity-Duration AVP, of type Unsigned32.
      • removeOcValidityDuration

        void removeOcValidityDuration()
        Removes the OC-Validity-Duration AVP from the OC-OLR AVP. If the OC-Validity-Duration 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 OC-OLR 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 OC-OLR 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 OC-OLR AVP. If no extension AVPs are present, this method returns silently.