Interface MmContentType

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface MmContentType
    extends GroupedAvp
    Defines an interface representing the MM-Content-Type grouped AVP type. From the Diameter Ro Reference Point Protocol Details (3GPP TS 32.299 V9.6.0) specification:
     7.2.108      MM-Content-Type AVP
     
     The MM-Content-Type AVP (AVP code 1203) is of type Grouped and indicates
     the overall content type of the MM content and includes information about
     all the contents of an MM.
     It has the following ABNF grammar:
     
         MM-Content-Type ::= < AVP Header: 1203 >
                             [ Type-Number ]
                             [ Additional-Type-Information ]
                             [ Content-Size ]
                           * [ Additional-Content-Information ]
     
     
    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

      • hasTypeNumber

        boolean hasTypeNumber()
        Returns true if the Type-Number AVP is present in the MM-Content-Type AVP.
      • getTypeNumber

        TypeNumber getTypeNumber()
        Returns the value of the Type-Number AVP, of type Enumerated.
        Returns:
        the value of the Type-Number AVP, or null if it has not been set.
      • setTypeNumber

        void setTypeNumber​(TypeNumber typeNumber)
        Sets the value of the Type-Number AVP, of type Enumerated.
        Throws:
        NullPointerException - if typeNumber is null.
      • removeTypeNumber

        void removeTypeNumber()
        Removes the Type-Number AVP from the MM-Content-Type AVP. If the Type-Number AVP is not present, this method returns silently.
      • hasAdditionalTypeInformation

        boolean hasAdditionalTypeInformation()
        Returns true if the Additional-Type-Information AVP is present in the MM-Content-Type AVP.
      • getAdditionalTypeInformation

        String getAdditionalTypeInformation()
        Returns the value of the Additional-Type-Information AVP, of type UTF8String.
        Returns:
        the value of the Additional-Type-Information AVP, or null if it has not been set.
      • setAdditionalTypeInformation

        void setAdditionalTypeInformation​(String additionalTypeInformation)
        Sets the value of the Additional-Type-Information AVP, of type UTF8String.
        Throws:
        NullPointerException - if additionalTypeInformation is null.
      • removeAdditionalTypeInformation

        void removeAdditionalTypeInformation()
        Removes the Additional-Type-Information AVP from the MM-Content-Type AVP. If the Additional-Type-Information AVP is not present, this method returns silently.
      • hasContentSize

        boolean hasContentSize()
        Returns true if the Content-Size AVP is present in the MM-Content-Type AVP.
      • getContentSize

        long getContentSize()
        Returns the value of the Content-Size AVP, of type Unsigned32. Use hasContentSize() to check the existence of this AVP.
        Returns:
        the value of the Content-Size AVP
        Throws:
        IllegalStateException - if the Content-Size AVP has not been set.
      • setContentSize

        void setContentSize​(long contentSize)
        Sets the value of the Content-Size AVP, of type Unsigned32.
      • removeContentSize

        void removeContentSize()
        Removes the Content-Size AVP from the MM-Content-Type AVP. If the Content-Size AVP is not present, this method returns silently.
      • getAdditionalContentInformations

        AdditionalContentInformation[] getAdditionalContentInformations()
        Returns the set of Additional-Content-Information AVPs. The returned array contains the AVPs in the order they appear in the MM-Content-Type AVP. A return value of null implies that no Additional-Content-Information AVPs have been set. The elements in the given array are AdditionalContentInformation objects.
      • setAdditionalContentInformation

        void setAdditionalContentInformation​(AdditionalContentInformation additionalContentInformation)
        Sets a single Additional-Content-Information AVP in the MM-Content-Type AVP, of type Grouped.
        Throws:
        NullPointerException - if additionalContentInformation is null.
      • setAdditionalContentInformations

        void setAdditionalContentInformations​(AdditionalContentInformation[] additionalContentInformations)
        Sets the set of Additional-Content-Information AVPs, with all the values in the given array. The AVPs will be added to the MM-Content-Type 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 getAdditionalContentInformations() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if additionalContentInformations is null.
      • removeAdditionalContentInformations

        void removeAdditionalContentInformations()
        Removes all Additional-Content-Information AVPs from the MM-Content-Type AVP. If no Additional-Content-Information AVPs are 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 MM-Content-Type 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 MM-Content-Type 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 MM-Content-Type AVP. If no extension AVPs are present, this method returns silently.