Interface UserIdentity
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface UserIdentity extends GroupedAvp
Defines an interface representing the User-Identity grouped AVP type. From the Diameter Sh Reference Point Protocol Details (3GPP TS 29.329 V9.4.0) specification:6.3.1 User-Identity AVP The User-Identity AVP is of type Grouped. This AVP contains either a Public-Identity AVP or an MSISDN AVP. AVP format User-Identity ::= <AVP Header: 700 10415> [Public-Identity] [MSISDN] *[AVP]
-
-
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.byte[]
getMsisdn()
Returns the value of the MSISDN AVP, of type OctetString.String
getPublicIdentity()
Returns the value of the Public-Identity AVP, of type UTF8String.boolean
hasMsisdn()
Returns true if the MSISDN AVP is present in the User-Identity AVP.boolean
hasPublicIdentity()
Returns true if the Public-Identity AVP is present in the User-Identity AVP.void
removeExtensionAvps()
Removes all extension AVPs from the User-Identity AVP.void
removeMsisdn()
Removes the MSISDN AVP from the User-Identity AVP.void
removePublicIdentity()
Removes the Public-Identity AVP from the User-Identity AVP.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setMsisdn(byte[] msisdn)
Sets the value of the MSISDN AVP, of type OctetString.void
setPublicIdentity(String publicIdentity)
Sets the value of the Public-Identity AVP, of type UTF8String.-
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
-
hasPublicIdentity
boolean hasPublicIdentity()
Returns true if the Public-Identity AVP is present in the User-Identity AVP.
-
getPublicIdentity
String getPublicIdentity()
Returns the value of the Public-Identity AVP, of type UTF8String.- Returns:
- the value of the Public-Identity AVP, or null if it has not been set.
-
setPublicIdentity
void setPublicIdentity(String publicIdentity)
Sets the value of the Public-Identity AVP, of type UTF8String.- Throws:
NullPointerException
- ifpublicIdentity
isnull
.
-
removePublicIdentity
void removePublicIdentity()
Removes the Public-Identity AVP from the User-Identity AVP. If the Public-Identity AVP is not present, this method returns silently.
-
hasMsisdn
boolean hasMsisdn()
Returns true if the MSISDN AVP is present in the User-Identity AVP.
-
getMsisdn
byte[] getMsisdn()
Returns the value of the MSISDN AVP, of type OctetString.- Returns:
- the value of the MSISDN AVP, or null if it has not been set.
-
setMsisdn
void setMsisdn(byte[] msisdn)
Sets the value of the MSISDN AVP, of type OctetString.- Throws:
NullPointerException
- ifmsisdn
isnull
.
-
removeMsisdn
void removeMsisdn()
Removes the MSISDN AVP from the User-Identity AVP. If the MSISDN 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 User-Identity 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 User-Identity 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 User-Identity AVP. If no extension AVPs are present, this method returns silently.
-
-