Interface SubscriptionId
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface SubscriptionId extends GroupedAvp
Defines an interface representing the Subscription-Id grouped AVP type. From the Diameter Credit-Control Application (rfc4006.txt) specification:8.46. Subscription-Id AVP The Subscription-Id AVP (AVP Code 443) is used to identify the end user's subscription and is of type Grouped. The Subscription-Id AVP includes a Subscription-Id-Data AVP that holds the identifier and a Subscription-Id-Type AVP that defines the identifier type. It is defined as follows (per the grouped-avp-def of RFC 3588 [DIAMBASE]): Subscription-Id ::= < AVP Header: 443 > { Subscription-Id-Type } { Subscription-Id-Data }
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 DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.String
getSubscriptionIdData()
Returns the value of the Subscription-Id-Data AVP, of type UTF8String.SubscriptionIdType
getSubscriptionIdType()
Returns the value of the Subscription-Id-Type AVP, of type Enumerated.boolean
hasSubscriptionIdData()
Returns true if the Subscription-Id-Data AVP is present in the Subscription-Id AVP.boolean
hasSubscriptionIdType()
Returns true if the Subscription-Id-Type AVP is present in the Subscription-Id AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Subscription-Id AVP.void
removeSubscriptionIdData()
Removes the Subscription-Id-Data AVP from the Subscription-Id AVP.void
removeSubscriptionIdType()
Removes the Subscription-Id-Type AVP from the Subscription-Id AVP.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setSubscriptionIdData(String subscriptionIdData)
Sets the value of the Subscription-Id-Data AVP, of type UTF8String.void
setSubscriptionIdType(SubscriptionIdType subscriptionIdType)
Sets the value of the Subscription-Id-Type AVP, of type Enumerated.-
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
-
hasSubscriptionIdType
boolean hasSubscriptionIdType()
Returns true if the Subscription-Id-Type AVP is present in the Subscription-Id AVP.
-
getSubscriptionIdType
SubscriptionIdType getSubscriptionIdType()
Returns the value of the Subscription-Id-Type AVP, of type Enumerated.- Returns:
- the value of the Subscription-Id-Type AVP, or null if it has not been set.
-
setSubscriptionIdType
void setSubscriptionIdType(SubscriptionIdType subscriptionIdType)
Sets the value of the Subscription-Id-Type AVP, of type Enumerated.- Throws:
NullPointerException
- ifsubscriptionIdType
isnull
.
-
removeSubscriptionIdType
void removeSubscriptionIdType()
Removes the Subscription-Id-Type AVP from the Subscription-Id AVP. If the Subscription-Id-Type AVP is not present, this method returns silently.
-
hasSubscriptionIdData
boolean hasSubscriptionIdData()
Returns true if the Subscription-Id-Data AVP is present in the Subscription-Id AVP.
-
getSubscriptionIdData
String getSubscriptionIdData()
Returns the value of the Subscription-Id-Data AVP, of type UTF8String.- Returns:
- the value of the Subscription-Id-Data AVP, or null if it has not been set.
-
setSubscriptionIdData
void setSubscriptionIdData(String subscriptionIdData)
Sets the value of the Subscription-Id-Data AVP, of type UTF8String.- Throws:
NullPointerException
- ifsubscriptionIdData
isnull
.
-
removeSubscriptionIdData
void removeSubscriptionIdData()
Removes the Subscription-Id-Data AVP from the Subscription-Id AVP. If the Subscription-Id-Data 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 Subscription-Id 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 Subscription-Id 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 Subscription-Id AVP. If no extension AVPs are present, this method returns silently.
-
-