Interface BasicServiceCode
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface BasicServiceCode extends GroupedAvp
Defines an interface representing the Basic-Service-Code grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V12.11.0) specification:7.2.29 A Basic-Service-Code AVP The Basic-Service-Code AVP (AVP code 3411) is of type Grouped and holds service information utilized by a voice call service. Either a Bearer-Service AVP or a Teleservice AVP is included. It has the following ABNF grammar: Basic-Service-Code ::= < AVP Header: 3411 > [ Bearer-Service ] [ Teleservice ]
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 byte[]
getBearerService()
Returns the value of the Bearer-Service AVP, of type OctetString.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.byte[]
getTeleservice()
Returns the value of the Teleservice AVP, of type OctetString.boolean
hasBearerService()
Returns true if the Bearer-Service AVP is present in the Basic-Service-Code AVP.boolean
hasTeleservice()
Returns true if the Teleservice AVP is present in the Basic-Service-Code AVP.void
removeBearerService()
Removes the Bearer-Service AVP from the Basic-Service-Code AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Basic-Service-Code AVP.void
removeTeleservice()
Removes the Teleservice AVP from the Basic-Service-Code AVP.void
setBearerService(byte[] bearerService)
Sets the value of the Bearer-Service AVP, of type OctetString.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setTeleservice(byte[] teleservice)
Sets the value of the Teleservice AVP, of type OctetString.-
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
-
hasBearerService
boolean hasBearerService()
Returns true if the Bearer-Service AVP is present in the Basic-Service-Code AVP.
-
getBearerService
byte[] getBearerService()
Returns the value of the Bearer-Service AVP, of type OctetString.- Returns:
- the value of the Bearer-Service AVP, or null if it has not been set.
-
setBearerService
void setBearerService(byte[] bearerService)
Sets the value of the Bearer-Service AVP, of type OctetString.- Throws:
NullPointerException
- ifbearerService
isnull
.
-
removeBearerService
void removeBearerService()
Removes the Bearer-Service AVP from the Basic-Service-Code AVP. If the Bearer-Service AVP is not present, this method returns silently.
-
hasTeleservice
boolean hasTeleservice()
Returns true if the Teleservice AVP is present in the Basic-Service-Code AVP.
-
getTeleservice
byte[] getTeleservice()
Returns the value of the Teleservice AVP, of type OctetString.- Returns:
- the value of the Teleservice AVP, or null if it has not been set.
-
setTeleservice
void setTeleservice(byte[] teleservice)
Sets the value of the Teleservice AVP, of type OctetString.- Throws:
NullPointerException
- ifteleservice
isnull
.
-
removeTeleservice
void removeTeleservice()
Removes the Teleservice AVP from the Basic-Service-Code AVP. If the Teleservice 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 Basic-Service-Code 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 Basic-Service-Code 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 Basic-Service-Code AVP. If no extension AVPs are present, this method returns silently.
-
-