Interface MessageClass

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface MessageClass
    extends GroupedAvp
    Defines an interface representing the Message-Class grouped AVP type. From the Diameter Ro Reference Point Protocol Details (3GPP TS 32.299 V11.8.0) specification:
     7.2.104      Message-Class AVP
     
     The Message-Class AVP (AVP code 1213) is of type Grouped.
     It has the following ABNF grammar:
     
         Message-Class ::=  < AVP Header: 1213 >
                            [ Class-Identifier ]
                            [ Token-Text ]
     
     
    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

      • hasClassIdentifier

        boolean hasClassIdentifier()
        Returns true if the Class-Identifier AVP is present in the Message-Class AVP.
      • getClassIdentifier

        ClassIdentifier getClassIdentifier()
        Returns the value of the Class-Identifier AVP, of type Enumerated.
        Returns:
        the value of the Class-Identifier AVP, or null if it has not been set.
      • setClassIdentifier

        void setClassIdentifier​(ClassIdentifier classIdentifier)
        Sets the value of the Class-Identifier AVP, of type Enumerated.
        Throws:
        NullPointerException - if classIdentifier is null.
      • removeClassIdentifier

        void removeClassIdentifier()
        Removes the Class-Identifier AVP from the Message-Class AVP. If the Class-Identifier AVP is not present, this method returns silently.
      • hasTokenText

        boolean hasTokenText()
        Returns true if the Token-Text AVP is present in the Message-Class AVP.
      • getTokenText

        String getTokenText()
        Returns the value of the Token-Text AVP, of type UTF8String.
        Returns:
        the value of the Token-Text AVP, or null if it has not been set.
      • setTokenText

        void setTokenText​(String tokenText)
        Sets the value of the Token-Text AVP, of type UTF8String.
        Throws:
        NullPointerException - if tokenText is null.
      • removeTokenText

        void removeTokenText()
        Removes the Token-Text AVP from the Message-Class AVP. If the Token-Text 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 Message-Class 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 Message-Class 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 Message-Class AVP. If no extension AVPs are present, this method returns silently.