Interface ServiceSpecificInfo
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface ServiceSpecificInfo extends GroupedAvp
Defines an interface representing the Service-Specific-Info grouped AVP type. From the Diameter Ro Reference Point Protocol Details (3GPP TS 32.299 V12.11.0) specification:7.2.195 Service-Specific-Info AVP The Service-Specific-Info AVP (AVP Code 1249) is of type Grouped and holds service specific data if and as provided by an Application Server or a PCEF only for pre-defined PCC rules. It has the following ABNF grammar: Service-Specific-Info ::= < AVP Header: 1249 > [ Service-Specific-Data ] [ Service-Specific-Type ]
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
getServiceSpecificData()
Returns the value of the Service-Specific-Data AVP, of type UTF8String.long
getServiceSpecificType()
Returns the value of the Service-Specific-Type AVP, of type Unsigned32.boolean
hasServiceSpecificData()
Returns true if the Service-Specific-Data AVP is present in the Service-Specific-Info AVP.boolean
hasServiceSpecificType()
Returns true if the Service-Specific-Type AVP is present in the Service-Specific-Info AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Service-Specific-Info AVP.void
removeServiceSpecificData()
Removes the Service-Specific-Data AVP from the Service-Specific-Info AVP.void
removeServiceSpecificType()
Removes the Service-Specific-Type AVP from the Service-Specific-Info AVP.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setServiceSpecificData(String serviceSpecificData)
Sets the value of the Service-Specific-Data AVP, of type UTF8String.void
setServiceSpecificType(long serviceSpecificType)
Sets the value of the Service-Specific-Type 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
-
hasServiceSpecificData
boolean hasServiceSpecificData()
Returns true if the Service-Specific-Data AVP is present in the Service-Specific-Info AVP.
-
getServiceSpecificData
String getServiceSpecificData()
Returns the value of the Service-Specific-Data AVP, of type UTF8String.- Returns:
- the value of the Service-Specific-Data AVP, or null if it has not been set.
-
setServiceSpecificData
void setServiceSpecificData(String serviceSpecificData)
Sets the value of the Service-Specific-Data AVP, of type UTF8String.- Throws:
NullPointerException
- ifserviceSpecificData
isnull
.
-
removeServiceSpecificData
void removeServiceSpecificData()
Removes the Service-Specific-Data AVP from the Service-Specific-Info AVP. If the Service-Specific-Data AVP is not present, this method returns silently.
-
hasServiceSpecificType
boolean hasServiceSpecificType()
Returns true if the Service-Specific-Type AVP is present in the Service-Specific-Info AVP.
-
getServiceSpecificType
long getServiceSpecificType()
Returns the value of the Service-Specific-Type AVP, of type Unsigned32. UsehasServiceSpecificType()
to check the existence of this AVP.- Returns:
- the value of the Service-Specific-Type AVP
- Throws:
IllegalStateException
- if the Service-Specific-Type AVP has not been set.
-
setServiceSpecificType
void setServiceSpecificType(long serviceSpecificType)
Sets the value of the Service-Specific-Type AVP, of type Unsigned32.
-
removeServiceSpecificType
void removeServiceSpecificType()
Removes the Service-Specific-Type AVP from the Service-Specific-Info AVP. If the Service-Specific-Type 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 Service-Specific-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 Service-Specific-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 Service-Specific-Info AVP. If no extension AVPs are present, this method returns silently.
-
-