Interface DisconnectPeerRequest

  • All Superinterfaces:
    Cloneable, DiameterMessage

    public interface DisconnectPeerRequest
    extends DiameterMessage
    Defines an interface representing the Disconnect-Peer-Request command. From the Diameter Base Protocol (rfc6733.txt) specification:
     5.4.1.  Disconnect-Peer-Request
     
        The Disconnect-Peer-Request (DPR), indicated by the Command Code set
        to 282 and the Command Flags' 'R' bit set, is sent to a peer to
        inform it of its intentions to shut down the transport connection.
        Upon detection of a transport failure, this message MUST NOT be sent
        to an alternate peer.
     
        Message Format
     
           <Disconnect-Peer-Request>  ::= < Diameter Header: 282, REQ >
                      { Origin-Host }
                      { Origin-Realm }
                      { Disconnect-Cause }
                    * [ 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.
      • hasDisconnectCause

        boolean hasDisconnectCause()
        Returns true if the Disconnect-Cause AVP is present in the message.
      • getDisconnectCause

        DisconnectCause getDisconnectCause()
        Returns the value of the Disconnect-Cause AVP, of type Enumerated.
        Returns:
        the value of the Disconnect-Cause AVP or null if it has not been set on this message
      • setDisconnectCause

        void setDisconnectCause​(DisconnectCause disconnectCause)
        Sets the value of the Disconnect-Cause AVP, of type Enumerated.
        Throws:
        NullPointerException - if disconnectCause is null.
      • removeDisconnectCause

        void removeDisconnectCause()
        Removes the Disconnect-Cause AVP from the message. If the Disconnect-Cause 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.