Interface CapabilitiesExchangeRequest

  • All Superinterfaces:
    Cloneable, DiameterMessage

    public interface CapabilitiesExchangeRequest
    extends DiameterMessage
    Defines an interface representing the Capabilities-Exchange-Request command. From the Diameter Base Protocol (rfc6733.txt) specification:
     5.3.1.  Capabilities-Exchange-Request
     
        The Capabilities-Exchange-Request (CER), indicated by the Command
        Code set to 257 and the Command Flags' 'R' bit set, is sent to
        exchange local capabilities.  Upon detection of a transport failure,
        this message MUST NOT be sent to an alternate peer.
     
        When Diameter is run over SCTP [RFC4960] or DTLS/SCTP [RFC6083],
        which allow for connections to span multiple interfaces and multiple
        IP addresses, the Capabilities-Exchange-Request message MUST contain
        one Host-IP-Address AVP for each potential IP address that MAY be
        locally used when transmitting Diameter messages.
     
        Message Format
     
           <Capabilities-Exchange-Request> ::= < Diameter Header: 257, REQ >
                     { Origin-Host }
                     { Origin-Realm }
                  1* { Host-IP-Address }
                     { Vendor-Id }
                     { Product-Name }
                     [ Origin-State-Id ]
                   * [ Supported-Vendor-Id ]
                   * [ Auth-Application-Id ]
                   * [ Inband-Security-Id ]
                   * [ Acct-Application-Id ]
                   * [ Vendor-Specific-Application-Id ]
                     [ Firmware-Revision ]
                   * [ 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.
      • getHostIpAddresses

        Address[] getHostIpAddresses()
        Returns the set of Host-IP-Address AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Host-IP-Address AVPs have been set. The elements in the given array are Address objects.
      • setHostIpAddress

        void setHostIpAddress​(Address hostIpAddress)
        Sets a single Host-IP-Address AVP in the message, of type Address.
        Throws:
        NullPointerException - if hostIpAddress is null.
      • setHostIpAddresses

        void setHostIpAddresses​(Address[] hostIpAddresses)
        Sets the set of Host-IP-Address 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 getHostIpAddresses() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if hostIpAddresses is null.
      • removeHostIpAddresses

        void removeHostIpAddresses()
        Removes all Host-IP-Address AVPs from the message. If no Host-IP-Address AVPs are present, this method returns silently.
      • hasVendorId

        boolean hasVendorId()
        Returns true if the Vendor-Id AVP is present in the message.
      • getVendorId

        long getVendorId()
        Returns the value of the Vendor-Id AVP, of type Unsigned32. Use hasVendorId() to check the existence of this AVP.
        Returns:
        the value of the Vendor-Id AVP
        Throws:
        IllegalStateException - if the Vendor-Id AVP has not been set on this message
      • setVendorId

        void setVendorId​(long vendorId)
        Sets the value of the Vendor-Id AVP, of type Unsigned32.
      • removeVendorId

        void removeVendorId()
        Removes the Vendor-Id AVP from the message. If the Vendor-Id AVP is not present, this method returns silently.
      • hasProductName

        boolean hasProductName()
        Returns true if the Product-Name AVP is present in the message.
      • getProductName

        String getProductName()
        Returns the value of the Product-Name AVP, of type UTF8String.
        Returns:
        the value of the Product-Name AVP or null if it has not been set on this message
      • setProductName

        void setProductName​(String productName)
        Sets the value of the Product-Name AVP, of type UTF8String.
        Throws:
        NullPointerException - if productName is null.
      • removeProductName

        void removeProductName()
        Removes the Product-Name AVP from the message. If the Product-Name AVP is not present, this method returns silently.
      • hasOriginStateId

        boolean hasOriginStateId()
        Returns true if the Origin-State-Id AVP is present in the message.
      • getOriginStateId

        long getOriginStateId()
        Returns the value of the Origin-State-Id AVP, of type Unsigned32. Use hasOriginStateId() to check the existence of this AVP.
        Returns:
        the value of the Origin-State-Id AVP
        Throws:
        IllegalStateException - if the Origin-State-Id AVP has not been set on this message
      • setOriginStateId

        void setOriginStateId​(long originStateId)
        Sets the value of the Origin-State-Id AVP, of type Unsigned32.
      • removeOriginStateId

        void removeOriginStateId()
        Removes the Origin-State-Id AVP from the message. If the Origin-State-Id AVP is not present, this method returns silently.
      • getSupportedVendorIds

        long[] getSupportedVendorIds()
        Returns the set of Supported-Vendor-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Supported-Vendor-Id AVPs have been set. The elements in the given array are long objects.
      • setSupportedVendorId

        void setSupportedVendorId​(long supportedVendorId)
        Sets a single Supported-Vendor-Id AVP in the message, of type Unsigned32.
      • setSupportedVendorIds

        void setSupportedVendorIds​(long[] supportedVendorIds)
        Sets the set of Supported-Vendor-Id 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 getSupportedVendorIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if supportedVendorIds is null.
      • removeSupportedVendorIds

        void removeSupportedVendorIds()
        Removes all Supported-Vendor-Id AVPs from the message. If no Supported-Vendor-Id AVPs are present, this method returns silently.
      • getAuthApplicationIds

        long[] getAuthApplicationIds()
        Returns the set of Auth-Application-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Auth-Application-Id AVPs have been set. The elements in the given array are long objects.
      • setAuthApplicationId

        void setAuthApplicationId​(long authApplicationId)
        Sets a single Auth-Application-Id AVP in the message, of type Unsigned32.
      • setAuthApplicationIds

        void setAuthApplicationIds​(long[] authApplicationIds)
        Sets the set of Auth-Application-Id 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 getAuthApplicationIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if authApplicationIds is null.
      • removeAuthApplicationIds

        void removeAuthApplicationIds()
        Removes all Auth-Application-Id AVPs from the message. If no Auth-Application-Id AVPs are present, this method returns silently.
      • getInbandSecurityIds

        long[] getInbandSecurityIds()
        Returns the set of Inband-Security-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Inband-Security-Id AVPs have been set. The elements in the given array are long objects.
      • setInbandSecurityId

        void setInbandSecurityId​(long inbandSecurityId)
        Sets a single Inband-Security-Id AVP in the message, of type Unsigned32.
      • setInbandSecurityIds

        void setInbandSecurityIds​(long[] inbandSecurityIds)
        Sets the set of Inband-Security-Id 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 getInbandSecurityIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if inbandSecurityIds is null.
      • removeInbandSecurityIds

        void removeInbandSecurityIds()
        Removes all Inband-Security-Id AVPs from the message. If no Inband-Security-Id AVPs are present, this method returns silently.
      • getAcctApplicationIds

        long[] getAcctApplicationIds()
        Returns the set of Acct-Application-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Acct-Application-Id AVPs have been set. The elements in the given array are long objects.
      • setAcctApplicationId

        void setAcctApplicationId​(long acctApplicationId)
        Sets a single Acct-Application-Id AVP in the message, of type Unsigned32.
      • setAcctApplicationIds

        void setAcctApplicationIds​(long[] acctApplicationIds)
        Sets the set of Acct-Application-Id 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 getAcctApplicationIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if acctApplicationIds is null.
      • removeAcctApplicationIds

        void removeAcctApplicationIds()
        Removes all Acct-Application-Id AVPs from the message. If no Acct-Application-Id AVPs are present, this method returns silently.
      • getVendorSpecificApplicationIds

        VendorSpecificApplicationId[] getVendorSpecificApplicationIds()
        Returns the set of Vendor-Specific-Application-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Vendor-Specific-Application-Id AVPs have been set. The elements in the given array are VendorSpecificApplicationId objects.
      • setVendorSpecificApplicationId

        void setVendorSpecificApplicationId​(VendorSpecificApplicationId vendorSpecificApplicationId)
        Sets a single Vendor-Specific-Application-Id AVP in the message, of type Grouped.
        Throws:
        NullPointerException - if vendorSpecificApplicationId is null.
      • setVendorSpecificApplicationIds

        void setVendorSpecificApplicationIds​(VendorSpecificApplicationId[] vendorSpecificApplicationIds)
        Sets the set of Vendor-Specific-Application-Id 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 getVendorSpecificApplicationIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if vendorSpecificApplicationIds is null.
      • removeVendorSpecificApplicationIds

        void removeVendorSpecificApplicationIds()
        Removes all Vendor-Specific-Application-Id AVPs from the message. If no Vendor-Specific-Application-Id AVPs are present, this method returns silently.
      • hasFirmwareRevision

        boolean hasFirmwareRevision()
        Returns true if the Firmware-Revision AVP is present in the message.
      • getFirmwareRevision

        long getFirmwareRevision()
        Returns the value of the Firmware-Revision AVP, of type Unsigned32. Use hasFirmwareRevision() to check the existence of this AVP.
        Returns:
        the value of the Firmware-Revision AVP
        Throws:
        IllegalStateException - if the Firmware-Revision AVP has not been set on this message
      • setFirmwareRevision

        void setFirmwareRevision​(long firmwareRevision)
        Sets the value of the Firmware-Revision AVP, of type Unsigned32.
      • removeFirmwareRevision

        void removeFirmwareRevision()
        Removes the Firmware-Revision AVP from the message. If the Firmware-Revision 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.