Interface SdpMediaComponent
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface SdpMediaComponent extends GroupedAvp
Defines an interface representing the SDP-Media-Component grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V7.1.0) specification:7.2.95 SDP-Media-Component AVP The SDP-Media-Component AVP (AVP code 843) is of type Grouped and contains information about media used for a IMS session. It has the following ABNF grammar: SDP-Media-Component ::= <AVP Header: 843 > [ SDP-Media-Name ] * [ SDP-Media-Description ] [ Media-Initiator-Flag] [ Authorized-QoS ] [ TGPP-Charging-Id ]
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 String
getAuthorizedQos()
Returns the value of the Authorized-QoS AVP, of type UTF8String.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.MediaInitiatorFlag
getMediaInitiatorFlag()
Returns the value of the Media-Initiator-Flag AVP, of type Enumerated.String[]
getSdpMediaDescriptions()
Returns the set of SDP-Media-Description AVPs.String
getSdpMediaName()
Returns the value of the SDP-Media-Name AVP, of type UTF8String.byte[]
getTgppChargingId()
Returns the value of the TGPP-Charging-Id AVP, of type OctetString.boolean
hasAuthorizedQos()
Returns true if the Authorized-QoS AVP is present in the SDP-Media-Component AVP.boolean
hasMediaInitiatorFlag()
Returns true if the Media-Initiator-Flag AVP is present in the SDP-Media-Component AVP.boolean
hasSdpMediaName()
Returns true if the SDP-Media-Name AVP is present in the SDP-Media-Component AVP.boolean
hasTgppChargingId()
Returns true if the TGPP-Charging-Id AVP is present in the SDP-Media-Component AVP.void
removeAuthorizedQos()
Removes the Authorized-QoS AVP from the SDP-Media-Component AVP.void
removeExtensionAvps()
Removes all extension AVPs from the SDP-Media-Component AVP.void
removeMediaInitiatorFlag()
Removes the Media-Initiator-Flag AVP from the SDP-Media-Component AVP.void
removeSdpMediaDescriptions()
Removes all SDP-Media-Description AVPs from the SDP-Media-Component AVP.void
removeSdpMediaName()
Removes the SDP-Media-Name AVP from the SDP-Media-Component AVP.void
removeTgppChargingId()
Removes the TGPP-Charging-Id AVP from the SDP-Media-Component AVP.void
setAuthorizedQos(String authorizedQos)
Sets the value of the Authorized-QoS AVP, of type UTF8String.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setMediaInitiatorFlag(MediaInitiatorFlag mediaInitiatorFlag)
Sets the value of the Media-Initiator-Flag AVP, of type Enumerated.void
setSdpMediaDescription(String sdpMediaDescription)
Sets a single SDP-Media-Description AVP in the SDP-Media-Component AVP, of type UTF8String.void
setSdpMediaDescriptions(String[] sdpMediaDescriptions)
Sets the set of SDP-Media-Description AVPs, with all the values in the given array.void
setSdpMediaName(String sdpMediaName)
Sets the value of the SDP-Media-Name AVP, of type UTF8String.void
setTgppChargingId(byte[] tgppChargingId)
Sets the value of the TGPP-Charging-Id 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
-
hasSdpMediaName
boolean hasSdpMediaName()
Returns true if the SDP-Media-Name AVP is present in the SDP-Media-Component AVP.
-
getSdpMediaName
String getSdpMediaName()
Returns the value of the SDP-Media-Name AVP, of type UTF8String.- Returns:
- the value of the SDP-Media-Name AVP, or null if it has not been set.
-
setSdpMediaName
void setSdpMediaName(String sdpMediaName)
Sets the value of the SDP-Media-Name AVP, of type UTF8String.- Throws:
NullPointerException
- ifsdpMediaName
isnull
.
-
removeSdpMediaName
void removeSdpMediaName()
Removes the SDP-Media-Name AVP from the SDP-Media-Component AVP. If the SDP-Media-Name AVP is not present, this method returns silently.
-
getSdpMediaDescriptions
String[] getSdpMediaDescriptions()
Returns the set of SDP-Media-Description AVPs. The returned array contains the AVPs in the order they appear in the SDP-Media-Component AVP. A return value of null implies that no SDP-Media-Description AVPs have been set. The elements in the given array are String objects.
-
setSdpMediaDescription
void setSdpMediaDescription(String sdpMediaDescription)
Sets a single SDP-Media-Description AVP in the SDP-Media-Component AVP, of type UTF8String.- Throws:
NullPointerException
- ifsdpMediaDescription
isnull
.
-
setSdpMediaDescriptions
void setSdpMediaDescriptions(String[] sdpMediaDescriptions)
Sets the set of SDP-Media-Description AVPs, with all the values in the given array. The AVPs will be added to the SDP-Media-Component 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 getSdpMediaDescriptions() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifsdpMediaDescriptions
isnull
.
-
removeSdpMediaDescriptions
void removeSdpMediaDescriptions()
Removes all SDP-Media-Description AVPs from the SDP-Media-Component AVP. If no SDP-Media-Description AVPs are present, this method returns silently.
-
hasMediaInitiatorFlag
boolean hasMediaInitiatorFlag()
Returns true if the Media-Initiator-Flag AVP is present in the SDP-Media-Component AVP.
-
getMediaInitiatorFlag
MediaInitiatorFlag getMediaInitiatorFlag()
Returns the value of the Media-Initiator-Flag AVP, of type Enumerated.- Returns:
- the value of the Media-Initiator-Flag AVP, or null if it has not been set.
-
setMediaInitiatorFlag
void setMediaInitiatorFlag(MediaInitiatorFlag mediaInitiatorFlag)
Sets the value of the Media-Initiator-Flag AVP, of type Enumerated.- Throws:
NullPointerException
- ifmediaInitiatorFlag
isnull
.
-
removeMediaInitiatorFlag
void removeMediaInitiatorFlag()
Removes the Media-Initiator-Flag AVP from the SDP-Media-Component AVP. If the Media-Initiator-Flag AVP is not present, this method returns silently.
-
hasAuthorizedQos
boolean hasAuthorizedQos()
Returns true if the Authorized-QoS AVP is present in the SDP-Media-Component AVP.
-
getAuthorizedQos
String getAuthorizedQos()
Returns the value of the Authorized-QoS AVP, of type UTF8String.- Returns:
- the value of the Authorized-QoS AVP, or null if it has not been set.
-
setAuthorizedQos
void setAuthorizedQos(String authorizedQos)
Sets the value of the Authorized-QoS AVP, of type UTF8String.- Throws:
NullPointerException
- ifauthorizedQos
isnull
.
-
removeAuthorizedQos
void removeAuthorizedQos()
Removes the Authorized-QoS AVP from the SDP-Media-Component AVP. If the Authorized-QoS AVP is not present, this method returns silently.
-
hasTgppChargingId
boolean hasTgppChargingId()
Returns true if the TGPP-Charging-Id AVP is present in the SDP-Media-Component AVP.
-
getTgppChargingId
byte[] getTgppChargingId()
Returns the value of the TGPP-Charging-Id AVP, of type OctetString.- Returns:
- the value of the TGPP-Charging-Id AVP, or null if it has not been set.
-
setTgppChargingId
void setTgppChargingId(byte[] tgppChargingId)
Sets the value of the TGPP-Charging-Id AVP, of type OctetString.- Throws:
NullPointerException
- iftgppChargingId
isnull
.
-
removeTgppChargingId
void removeTgppChargingId()
Removes the TGPP-Charging-Id AVP from the SDP-Media-Component AVP. If the TGPP-Charging-Id 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 SDP-Media-Component 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 SDP-Media-Component 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 SDP-Media-Component AVP. If no extension AVPs are present, this method returns silently.
-
-