Interface AocSubscriptionInformation
-
- All Superinterfaces:
Cloneable,DiameterAvp,GroupedAvp
public interface AocSubscriptionInformation extends GroupedAvp
Defines an interface representing the AoC-Subscription-Information grouped AVP type. From the Diameter Ro Reference Point Protocol Details (3GPP TS 32.299 V12.11.0) specification:7.2.20 AoC-Subscription-Information AVP The AoC-Subscription-Information AVP (AVP code 2314) is of type Grouped and holds the subscription and formatting parameters received from HSS. It has the following ABNF grammar: AoC-Subscription-Information ::= < AVP Header: 2314 > * [ AoC-Service ] [ AoC-Format ] [ Preferred-AoC-Currency ]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 AocFormatgetAocFormat()Returns the value of the AoC-Format AVP, of type Enumerated.AocService[]getAocServices()Returns the set of AoC-Service AVPs.DiameterAvp[]getExtensionAvps()Returns the set of extension AVPs.longgetPreferredAocCurrency()Returns the value of the Preferred-AoC-Currency AVP, of type Unsigned32.booleanhasAocFormat()Returns true if the AoC-Format AVP is present in the AoC-Subscription-Information AVP.booleanhasPreferredAocCurrency()Returns true if the Preferred-AoC-Currency AVP is present in the AoC-Subscription-Information AVP.voidremoveAocFormat()Removes the AoC-Format AVP from the AoC-Subscription-Information AVP.voidremoveAocServices()Removes all AoC-Service AVPs from the AoC-Subscription-Information AVP.voidremoveExtensionAvps()Removes all extension AVPs from the AoC-Subscription-Information AVP.voidremovePreferredAocCurrency()Removes the Preferred-AoC-Currency AVP from the AoC-Subscription-Information AVP.voidsetAocFormat(AocFormat aocFormat)Sets the value of the AoC-Format AVP, of type Enumerated.voidsetAocService(AocService aocService)Sets a single AoC-Service AVP in the AoC-Subscription-Information AVP, of type Grouped.voidsetAocServices(AocService[] aocServices)Sets the set of AoC-Service AVPs, with all the values in the given array.voidsetExtensionAvps(DiameterAvp[] avps)Sets the set of extension AVPs with all the values in the given array.voidsetPreferredAocCurrency(long preferredAocCurrency)Sets the value of the Preferred-AoC-Currency AVP, of type Unsigned32.-
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
-
getAocServices
AocService[] getAocServices()
Returns the set of AoC-Service AVPs. The returned array contains the AVPs in the order they appear in the AoC-Subscription-Information AVP. A return value of null implies that no AoC-Service AVPs have been set. The elements in the given array are AocService objects.
-
setAocService
void setAocService(AocService aocService)
Sets a single AoC-Service AVP in the AoC-Subscription-Information AVP, of type Grouped.- Throws:
NullPointerException- ifaocServiceisnull.
-
setAocServices
void setAocServices(AocService[] aocServices)
Sets the set of AoC-Service AVPs, with all the values in the given array. The AVPs will be added to the AoC-Subscription-Information 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 getAocServices() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException- ifaocServicesisnull.
-
removeAocServices
void removeAocServices()
Removes all AoC-Service AVPs from the AoC-Subscription-Information AVP. If no AoC-Service AVPs are present, this method returns silently.
-
hasAocFormat
boolean hasAocFormat()
Returns true if the AoC-Format AVP is present in the AoC-Subscription-Information AVP.
-
getAocFormat
AocFormat getAocFormat()
Returns the value of the AoC-Format AVP, of type Enumerated.- Returns:
- the value of the AoC-Format AVP, or null if it has not been set.
-
setAocFormat
void setAocFormat(AocFormat aocFormat)
Sets the value of the AoC-Format AVP, of type Enumerated.- Throws:
NullPointerException- ifaocFormatisnull.
-
removeAocFormat
void removeAocFormat()
Removes the AoC-Format AVP from the AoC-Subscription-Information AVP. If the AoC-Format AVP is not present, this method returns silently.
-
hasPreferredAocCurrency
boolean hasPreferredAocCurrency()
Returns true if the Preferred-AoC-Currency AVP is present in the AoC-Subscription-Information AVP.
-
getPreferredAocCurrency
long getPreferredAocCurrency()
Returns the value of the Preferred-AoC-Currency AVP, of type Unsigned32. UsehasPreferredAocCurrency()to check the existence of this AVP.- Returns:
- the value of the Preferred-AoC-Currency AVP
- Throws:
IllegalStateException- if the Preferred-AoC-Currency AVP has not been set.
-
setPreferredAocCurrency
void setPreferredAocCurrency(long preferredAocCurrency)
Sets the value of the Preferred-AoC-Currency AVP, of type Unsigned32.
-
removePreferredAocCurrency
void removePreferredAocCurrency()
Removes the Preferred-AoC-Currency AVP from the AoC-Subscription-Information AVP. If the Preferred-AoC-Currency 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 AoC-Subscription-Information 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 AoC-Subscription-Information 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- ifavpsisnull.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the AoC-Subscription-Information AVP. If no extension AVPs are present, this method returns silently.
-
-