com.ibm.diameter.charging.util
Class SDPMediaComponent

java.lang.Object
  extended by com.ibm.diameter.charging.util.SDPMediaComponent

public class SDPMediaComponent
extends java.lang.Object

SDPMediaComponent is a lightweight representation of the Grouped [SDP-Media-Component] Avp. It contains information about the SDP media used in an IMS SIP session.

The [SDP-Media-Component] Avp is defined by the 3GPP in ETSI TS 132 299 V6.9.0 (2006-12) - Diameter charging applications.


Constructor Summary
SDPMediaComponent()
          Constructs an empty SDPMediaComponent object representing the [SDP-Media-Component] Avp.
SDPMediaComponent(java.util.List<Avp> avps)
          Constructs a SDPMediaComponent object representing the Grouped [SDP-Media-Component] Avp.
 
Method Summary
 java.lang.String getAuthorizedQos()
          Gets the value corresponding to the payload of the [Authorized-QoS] Avp.
 java.lang.Integer getMediaInitiatorFlag()
          Gets the value corresponding to the payload of the [Media-Initiator-Flag] Avp.
 java.lang.String[] getSdpMediaDescription()
          Gets the value corresponding to the payload of the [SDP-Media-Description] Avp.
 java.lang.String getSdpMediaName()
          Gets the value corresponding to the payload of the [SDP-Media-Name] Avp.
 java.lang.Integer getTgppChargingId()
          Gets the value corresponding to the payload of the [3GPP-Charging-Id] Avp.
 void setAuthorizedQos(java.lang.String authorizedQoS)
          Sets the value corresponding to the payload of the [Authorized-QoS] Avp.
 void setMediaInitiatorFlag(java.lang.Integer mediaInitiatorFlag)
          Sets the value corresponding to the payload of the [Media-Initiator-Flag] Avp.
 void setSdpMediaDescription(java.lang.String[] sdpMediaDescription)
          Sets the value corresponding to the payload of the [SDP-Media-Description] Avp.
 void setSdpMediaName(java.lang.String sdpMediaName)
          Sets the value corresponding to the payload of the [SDP-Media-Name] Avp.
 void setTgppChargingId(java.lang.Integer tgppChargingId)
          Sets the value corresponding to the payload of the [3GPP-Charging-Id] Avp.
 Avp toAvp()
          Transforms a SDPMediaComponent object into a Grouped [SDP-Media-Component] Avp.
 void validate()
          Validates the members of the SDPMediaComponent object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDPMediaComponent

public SDPMediaComponent()
Constructs an empty SDPMediaComponent object representing the [SDP-Media-Component] Avp.


SDPMediaComponent

public SDPMediaComponent(java.util.List<Avp> avps)
                  throws AvpTransformationException
Constructs a SDPMediaComponent object representing the Grouped [SDP-Media-Component] Avp.

The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of SDPMediaComponent, the member will be populated with the Avp value during construction. If an Avp code is unknown, the value will be silently discarded.

Parameters:
avps - a list of Avps that can appear in the Grouped [SDP-Media-Component] Avp.
Throws:
AvpTransformationException - if the Avp value is in an unexpected format.
Method Detail

getAuthorizedQos

public java.lang.String getAuthorizedQos()
Gets the value corresponding to the payload of the [Authorized-QoS] Avp.

Returns:
the value corresponding to the payload of the [Authorized-QoS] Avp.

setAuthorizedQos

public void setAuthorizedQos(java.lang.String authorizedQoS)
Sets the value corresponding to the payload of the [Authorized-QoS] Avp.

Parameters:
authorizedQos - the value corresponding to the payload of the [Authorized-QoS] Avp.

getMediaInitiatorFlag

public java.lang.Integer getMediaInitiatorFlag()
Gets the value corresponding to the payload of the [Media-Initiator-Flag] Avp.

Returns:
the value corresponding to the payload of the [Media-Initiator-Flag] Avp.

setMediaInitiatorFlag

public void setMediaInitiatorFlag(java.lang.Integer mediaInitiatorFlag)
Sets the value corresponding to the payload of the [Media-Initiator-Flag] Avp.

Parameters:
mediaInitiatorFlag - the value corresponding to the payload of the [Media-Initiator-Flag] Avp.

getSdpMediaDescription

public java.lang.String[] getSdpMediaDescription()
Gets the value corresponding to the payload of the [SDP-Media-Description] Avp.

Returns:
the value corresponding to the payload of the [SDP-Media-Description] Avp.

setSdpMediaDescription

public void setSdpMediaDescription(java.lang.String[] sdpMediaDescription)
Sets the value corresponding to the payload of the [SDP-Media-Description] Avp.

Parameters:
sdpMediaDescription - the value corresponding to the payload of the [SDP-Media-Description] Avp.

getSdpMediaName

public java.lang.String getSdpMediaName()
Gets the value corresponding to the payload of the [SDP-Media-Name] Avp.

Returns:
the value corresponding to the payload of the [SDP-Media-Name] Avp.

setSdpMediaName

public void setSdpMediaName(java.lang.String sdpMediaName)
Sets the value corresponding to the payload of the [SDP-Media-Name] Avp.

Parameters:
sdpMediaName - the value corresponding to the payload of the [SDP-Media-Name] Avp.

getTgppChargingId

public java.lang.Integer getTgppChargingId()
Gets the value corresponding to the payload of the [3GPP-Charging-Id] Avp.

Returns:
the value corresponding to the payload of the [PoC-Information] Avp.

setTgppChargingId

public void setTgppChargingId(java.lang.Integer tgppChargingId)
Sets the value corresponding to the payload of the [3GPP-Charging-Id] Avp.

Parameters:
tgppChargingId - the value corresponding to the payload of the [PoC-Information] Avp.

validate

public void validate()
              throws ChargingValidationException
Validates the members of the SDPMediaComponent object. The charging Web Services call this method before transforming the object into a Grouped Avp. This ensures that improperly formed Avps are not sent to the Diameter peer.

Throws:
ChargingValidationException - if a member of SDPMediaComponent is in an unexpected format.

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a SDPMediaComponent object into a Grouped [SDP-Media-Component] Avp.

All non-null members of SDPMediaComponent will be transformed into Avps nested inside of the [SDP-Media-Component] Avp.

Returns:
the [SDP-Media-Component] Avp.
Throws:
AvpTransformationException - if a member of SDPMediaComponent is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.