Interface RecipientInfo

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface RecipientInfo
    extends GroupedAvp
    Defines an interface representing the Recipient-Info grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V12.11.0) specification:
     7.2.168        Recipient-Info AVP
     
     The Recipient-Info AVP (AVP code 2026) is of type Grouped. Its purpose is to group information associated with a recipient 
     and contains the list of Recipient addresses of the message.
     It has the following ABNF grammar:
     
         Recipient-Info ::=  < AVP Header: 2026 >
                             [ Destination-Interface ]
                           * [ Recipient-Address ]
                           * [ Recipient-Received-Address ]
                             [ Recipient-SCCP-Address ]
                             [ SM-Protocol-ID ]
     NOTE 1: This Recipient-Info AVP allows charging for messages with multiple recipients by repeating this AVP for every recipient. The Recipient-Info AVP unambigiously associates the grouped information to one specific recipient. 
     NOTE 2: The SM-Protocol-ID AVP only relates to the recipient when charging MT SMS messages as specified in TS 23.040 [216].
     
     
    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

      • hasDestinationInterface

        boolean hasDestinationInterface()
        Returns true if the Destination-Interface AVP is present in the Recipient-Info AVP.
      • getDestinationInterface

        DestinationInterface getDestinationInterface()
        Returns the value of the Destination-Interface AVP, of type Grouped.
        Returns:
        the value of the Destination-Interface AVP, or null if it has not been set.
      • setDestinationInterface

        void setDestinationInterface​(DestinationInterface destinationInterface)
        Sets the value of the Destination-Interface AVP, of type Grouped.
        Throws:
        NullPointerException - if destinationInterface is null.
      • removeDestinationInterface

        void removeDestinationInterface()
        Removes the Destination-Interface AVP from the Recipient-Info AVP. If the Destination-Interface AVP is not present, this method returns silently.
      • getRecipientAddresses

        RecipientAddress[] getRecipientAddresses()
        Returns the set of Recipient-Address AVPs. The returned array contains the AVPs in the order they appear in the Recipient-Info AVP. A return value of null implies that no Recipient-Address AVPs have been set. The elements in the given array are RecipientAddress objects.
      • setRecipientAddress

        void setRecipientAddress​(RecipientAddress recipientAddress)
        Sets a single Recipient-Address AVP in the Recipient-Info AVP, of type Grouped.
        Throws:
        NullPointerException - if recipientAddress is null.
      • setRecipientAddresses

        void setRecipientAddresses​(RecipientAddress[] recipientAddresses)
        Sets the set of Recipient-Address AVPs, with all the values in the given array. The AVPs will be added to the Recipient-Info 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 getRecipientAddresses() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if recipientAddresses is null.
      • removeRecipientAddresses

        void removeRecipientAddresses()
        Removes all Recipient-Address AVPs from the Recipient-Info AVP. If no Recipient-Address AVPs are present, this method returns silently.
      • getRecipientReceivedAddresses

        RecipientReceivedAddress[] getRecipientReceivedAddresses()
        Returns the set of Recipient-Received-Address AVPs. The returned array contains the AVPs in the order they appear in the Recipient-Info AVP. A return value of null implies that no Recipient-Received-Address AVPs have been set. The elements in the given array are RecipientReceivedAddress objects.
      • setRecipientReceivedAddress

        void setRecipientReceivedAddress​(RecipientReceivedAddress recipientReceivedAddress)
        Sets a single Recipient-Received-Address AVP in the Recipient-Info AVP, of type Grouped.
        Throws:
        NullPointerException - if recipientReceivedAddress is null.
      • setRecipientReceivedAddresses

        void setRecipientReceivedAddresses​(RecipientReceivedAddress[] recipientReceivedAddresses)
        Sets the set of Recipient-Received-Address AVPs, with all the values in the given array. The AVPs will be added to the Recipient-Info 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 getRecipientReceivedAddresses() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if recipientReceivedAddresses is null.
      • removeRecipientReceivedAddresses

        void removeRecipientReceivedAddresses()
        Removes all Recipient-Received-Address AVPs from the Recipient-Info AVP. If no Recipient-Received-Address AVPs are present, this method returns silently.
      • hasRecipientSccpAddress

        boolean hasRecipientSccpAddress()
        Returns true if the Recipient-SCCP-Address AVP is present in the Recipient-Info AVP.
      • getRecipientSccpAddress

        Address getRecipientSccpAddress()
        Returns the value of the Recipient-SCCP-Address AVP, of type Address.
        Returns:
        the value of the Recipient-SCCP-Address AVP, or null if it has not been set.
      • setRecipientSccpAddress

        void setRecipientSccpAddress​(Address recipientSccpAddress)
        Sets the value of the Recipient-SCCP-Address AVP, of type Address.
        Throws:
        NullPointerException - if recipientSccpAddress is null.
      • removeRecipientSccpAddress

        void removeRecipientSccpAddress()
        Removes the Recipient-SCCP-Address AVP from the Recipient-Info AVP. If the Recipient-SCCP-Address AVP is not present, this method returns silently.
      • hasSmProtocolId

        boolean hasSmProtocolId()
        Returns true if the SM-Protocol-ID AVP is present in the Recipient-Info AVP.
      • getSmProtocolId

        byte[] getSmProtocolId()
        Returns the value of the SM-Protocol-ID AVP, of type OctetString.
        Returns:
        the value of the SM-Protocol-ID AVP, or null if it has not been set.
      • setSmProtocolId

        void setSmProtocolId​(byte[] smProtocolId)
        Sets the value of the SM-Protocol-ID AVP, of type OctetString.
        Throws:
        NullPointerException - if smProtocolId is null.
      • removeSmProtocolId

        void removeSmProtocolId()
        Removes the SM-Protocol-ID AVP from the Recipient-Info AVP. If the SM-Protocol-ID 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 Recipient-Info 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 Recipient-Info 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 Recipient-Info AVP. If no extension AVPs are present, this method returns silently.