Interface ExtensionDiameterMessage

  • All Superinterfaces:
    Cloneable, DiameterMessage

    public interface ExtensionDiameterMessage
    extends DiameterMessage
    Defines an interface representing the Extension-Diameter-Message command.
     
         An implementation of DiameterMessage for extension messages--those not defined by the
         Diameter RA being used.
     
         It follows the same pattern as the standard message types, but with the DiameterCommand supplied
         by the user.
     
         The AVPs are exposed as the set of 'extension AVP's', the same way as exposed for messages
         which define a "* [ AVP ]" line in the BNF definition of the message.
     
         Message Format
     
           <Extension-Diameter-Message> ::= < Diameter Header: 0, PXY >
                      < Session-Id >
                      { Origin-Host }
                      { Origin-Realm }
                      { Destination-Host }
                      { Destination-Realm }
                    * [ AVP ]
     
    • Method Detail

      • hasSessionId

        boolean hasSessionId()
        Returns true if the Session-Id AVP is present in the message.
      • getSessionId

        String getSessionId()
        Returns the value of the Session-Id AVP, of type UTF8String. A return value of null implies that the AVP has not been set.
        Specified by:
        getSessionId in interface DiameterMessage
      • getOriginHost

        DiameterIdentity getOriginHost()
        Returns the value of the Origin-Host AVP, of type DiameterIdentity. A return value of null implies that the AVP has not been set.
        Specified by:
        getOriginHost in interface DiameterMessage
      • getOriginRealm

        DiameterIdentity getOriginRealm()
        Returns the value of the Origin-Realm AVP, of type DiameterIdentity. A return value of null implies that the AVP has not been set.
        Specified by:
        getOriginRealm in interface DiameterMessage
      • getDestinationHost

        DiameterIdentity getDestinationHost()
        Returns the value of the Destination-Host AVP, of type DiameterIdentity. A return value of null implies that the AVP has not been set.
        Specified by:
        getDestinationHost in interface DiameterMessage
      • getDestinationRealm

        DiameterIdentity getDestinationRealm()
        Returns the value of the Destination-Realm AVP, of type DiameterIdentity. A return value of null implies that the AVP has not been set.
        Specified by:
        getDestinationRealm in interface DiameterMessage
      • 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.