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 V10.0.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:
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.
-
-
Field Summary
-
Fields inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DestinationInterface
getDestinationInterface()
Returns the value of the Destination-Interface AVP, of type Grouped.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.RecipientAddress[]
getRecipientAddresses()
Returns the set of Recipient-Address AVPs.RecipientReceivedAddress[]
getRecipientReceivedAddresses()
Returns the set of Recipient-Received-Address AVPs.Address
getRecipientSccpAddress()
Returns the value of the Recipient-SCCP-Address AVP, of type Address.byte[]
getSmProtocolId()
Returns the value of the SM-Protocol-ID AVP, of type OctetString.boolean
hasDestinationInterface()
Returns true if the Destination-Interface AVP is present in the Recipient-Info AVP.boolean
hasRecipientSccpAddress()
Returns true if the Recipient-SCCP-Address AVP is present in the Recipient-Info AVP.boolean
hasSmProtocolId()
Returns true if the SM-Protocol-ID AVP is present in the Recipient-Info AVP.void
removeDestinationInterface()
Removes the Destination-Interface AVP from the Recipient-Info AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Recipient-Info AVP.void
removeRecipientAddresses()
Removes all Recipient-Address AVPs from the Recipient-Info AVP.void
removeRecipientReceivedAddresses()
Removes all Recipient-Received-Address AVPs from the Recipient-Info AVP.void
removeRecipientSccpAddress()
Removes the Recipient-SCCP-Address AVP from the Recipient-Info AVP.void
removeSmProtocolId()
Removes the SM-Protocol-ID AVP from the Recipient-Info AVP.void
setDestinationInterface(DestinationInterface destinationInterface)
Sets the value of the Destination-Interface AVP, of type Grouped.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setRecipientAddress(RecipientAddress recipientAddress)
Sets a single Recipient-Address AVP in the Recipient-Info AVP, of type Grouped.void
setRecipientAddresses(RecipientAddress[] recipientAddresses)
Sets the set of Recipient-Address AVPs, with all the values in the given array.void
setRecipientReceivedAddress(RecipientReceivedAddress recipientReceivedAddress)
Sets a single Recipient-Received-Address AVP in the Recipient-Info AVP, of type Grouped.void
setRecipientReceivedAddresses(RecipientReceivedAddress[] recipientReceivedAddresses)
Sets the set of Recipient-Received-Address AVPs, with all the values in the given array.void
setRecipientSccpAddress(Address recipientSccpAddress)
Sets the value of the Recipient-SCCP-Address AVP, of type Address.void
setSmProtocolId(byte[] smProtocolId)
Sets the value of the SM-Protocol-ID AVP, of type OctetString.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
-
-
-
-
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
- ifdestinationInterface
isnull
.
-
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
- ifrecipientAddress
isnull
.
-
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
- ifrecipientAddresses
isnull
.
-
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
- ifrecipientReceivedAddress
isnull
.
-
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
- ifrecipientReceivedAddresses
isnull
.
-
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
- ifrecipientSccpAddress
isnull
.
-
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
- ifsmProtocolId
isnull
.
-
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
- ifavps
isnull
.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the Recipient-Info AVP. If no extension AVPs are present, this method returns silently.
-
-