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 Rf 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.StringgetServiceSpecificData()Returns the value of the Service-Specific-Data AVP, of type UTF8String.longgetServiceSpecificType()Returns the value of the Service-Specific-Type AVP, of type Unsigned32.booleanhasServiceSpecificData()Returns true if the Service-Specific-Data AVP is present in the Service-Specific-Info AVP.booleanhasServiceSpecificType()Returns true if the Service-Specific-Type AVP is present in the Service-Specific-Info AVP.voidremoveExtensionAvps()Removes all extension AVPs from the Service-Specific-Info AVP.voidremoveServiceSpecificData()Removes the Service-Specific-Data AVP from the Service-Specific-Info AVP.voidremoveServiceSpecificType()Removes the Service-Specific-Type AVP from the Service-Specific-Info AVP.voidsetExtensionAvps(DiameterAvp[] avps)Sets the set of extension AVPs with all the values in the given array.voidsetServiceSpecificData(String serviceSpecificData)Sets the value of the Service-Specific-Data AVP, of type UTF8String.voidsetServiceSpecificType(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- ifserviceSpecificDataisnull.
-
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- ifavpsisnull.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the Service-Specific-Info AVP. If no extension AVPs are present, this method returns silently.
-
-