Interface CapabilitiesUpdateAnswer

  • All Superinterfaces:
    Cloneable, DiameterMessage

    public interface CapabilitiesUpdateAnswer
    extends DiameterMessage
    Defines an interface representing the Capabilities-Update-Answer command. From the The Diameter Capabilities Update Application specification (rfc6737.txt) specification:
     4.1.2.  Capabilities-Update-Answer
     
        The Capabilities-Update-Answer, indicated by the Command Code set to
        328 and the Command Flags' 'R' bit cleared, is sent in response to a
        CUR message.
     
        Message Format
     
             <Capabilities-Update-Answer> ::= < Diameter Header: 328 >
                                    { Origin-Host }
                                    { Origin-Realm }
                                    { Result-Code }
                                    [ Error-Message ]
                                  * [ AVP ]
     
    • Method Detail

      • hasOriginHost

        boolean hasOriginHost()
        Returns true if the Origin-Host AVP is present in the message.
      • getOriginHost

        DiameterIdentity getOriginHost()
        Returns the value of the Origin-Host AVP, of type DiameterIdentity.
        Specified by:
        getOriginHost in interface DiameterMessage
        Returns:
        the value of the Origin-Host AVP or null if it has not been set on this message
      • removeOriginHost

        void removeOriginHost()
        Removes the Origin-Host AVP from the message. If the Origin-Host AVP is not present, this method returns silently.
      • hasOriginRealm

        boolean hasOriginRealm()
        Returns true if the Origin-Realm AVP is present in the message.
      • getOriginRealm

        DiameterIdentity getOriginRealm()
        Returns the value of the Origin-Realm AVP, of type DiameterIdentity.
        Specified by:
        getOriginRealm in interface DiameterMessage
        Returns:
        the value of the Origin-Realm AVP or null if it has not been set on this message
      • removeOriginRealm

        void removeOriginRealm()
        Removes the Origin-Realm AVP from the message. If the Origin-Realm AVP is not present, this method returns silently.
      • hasResultCode

        boolean hasResultCode()
        Returns true if the Result-Code AVP is present in the message.
      • getResultCode

        long getResultCode()
        Returns the value of the Result-Code AVP, of type Unsigned32. Use hasResultCode() to check the existence of this AVP.
        Returns:
        the value of the Result-Code AVP
        Throws:
        IllegalStateException - if the Result-Code AVP has not been set on this message
      • setResultCode

        void setResultCode​(long resultCode)
        Sets the value of the Result-Code AVP, of type Unsigned32.
      • removeResultCode

        void removeResultCode()
        Removes the Result-Code AVP from the message. If the Result-Code AVP is not present, this method returns silently.
      • hasErrorMessage

        boolean hasErrorMessage()
        Returns true if the Error-Message AVP is present in the message.
      • getErrorMessage

        String getErrorMessage()
        Returns the value of the Error-Message AVP, of type UTF8String.
        Returns:
        the value of the Error-Message AVP or null if it has not been set on this message
      • setErrorMessage

        void setErrorMessage​(String errorMessage)
        Sets the value of the Error-Message AVP, of type UTF8String.
        Throws:
        NullPointerException - if errorMessage is null.
      • removeErrorMessage

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