gov.nist.javax.sdp
クラス MediaDescriptionImpl

java.lang.Object
  上位を拡張 gov.nist.javax.sdp.MediaDescriptionImpl
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Cloneable, javax.sdp.MediaDescription

public class MediaDescriptionImpl
extends java.lang.Object
implements javax.sdp.MediaDescription

Fieldementation of Media Description interface.

バージョン:
JSR141-PUBLIC-REVIEW (subject to change).
作成者:
Olivier Deruelle , M. Ranganathan
This code is in the public domain.
関連項目:
直列化された形式

コンストラクタの概要
MediaDescriptionImpl()
           
 
メソッドの概要
 void addBandwidthField(BandwidthField b)
          Set the bandwidthField member
 void addDynamicPayloads(java.util.Vector payloadNames, java.util.Vector payloadValues)
          Adds dynamic media types to the description.
 java.lang.String encode()
          Encode to a canonical form.
 java.lang.String getAttribute(java.lang.String name)
          Returns the value of the specified attribute.
 java.util.Vector getAttributeFields()
           
 java.util.Vector getAttributes(boolean create)
          Returns the set of attributes for this Description as a Vector of Attribute objects in the order they were parsed.
 int getBandwidth(java.lang.String name)
          Returns the integer value of the specified bandwidth name.
 java.util.Vector getBandwidths(boolean create)
          Returns the Bandwidth of the specified type.
 javax.sdp.Connection getConnection()
          Returns the connection information associated with this object.
 ConnectionField getConnectionField()
           
 javax.sdp.Info getInfo()
          Returns value of the info field (i=) of this object.
 InformationField getInformationField()
           
 javax.sdp.Key getKey()
          Returns the key data.
 KeyField getKeyField()
           
 javax.sdp.Media getMedia()
          Return the Media field of the description.
 MediaField getMediaField()
           
 java.util.Vector getMimeParameters()
          Returns a Vector containing a string of parameters for each of the codecs in this description.
 java.util.Vector getMimeTypes()
          Returns a Vector containing a string indicating the MIME type for each of the codecs in this description.
 void removeAttribute(java.lang.String name)
          Removes the attribute specified by the value parameter.
 void removeBandwidth(java.lang.String name)
          Removes the specified bandwidth type.
 void setAttribute(java.lang.String name, java.lang.String value)
          Sets the value of the specified attribute
 void setAttributeFields(java.util.Vector a)
          Set the attributeFields member
 void setAttributes(java.util.Vector attributes)
          Adds the specified Attribute to this Description object.
 void setBandwidth(java.lang.String name, int value)
          Sets the value of the specified bandwidth type.
 void setBandwidths(java.util.Vector bandwidths)
          set the value of the Bandwidth with the specified type
 void setConnection(javax.sdp.Connection conn)
          Set the connection data for this entity
 void setConnectionField(ConnectionField c)
          Set the connectionField member
 void setInfo(javax.sdp.Info i)
          Sets the i= field of this object.
 void setInformationField(InformationField i)
          Set the informationField member
 void setKey(javax.sdp.Key key)
          Sets encryption key information.
 void setKeyField(KeyField k)
          Set the keyField member
 void setMedia(javax.sdp.Media media)
          Set the Media field of the description.
 void setMediaField(MediaField m)
          Set the mediaField member
 java.lang.String toString()
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

MediaDescriptionImpl

public MediaDescriptionImpl()
メソッドの詳細

encode

public java.lang.String encode()
Encode to a canonical form.

導入されたバージョン:
v1.0

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString

getMediaField

public MediaField getMediaField()

getInformationField

public InformationField getInformationField()

getConnectionField

public ConnectionField getConnectionField()

getKeyField

public KeyField getKeyField()

getAttributeFields

public java.util.Vector getAttributeFields()

setMediaField

public void setMediaField(MediaField m)
Set the mediaField member


setInformationField

public void setInformationField(InformationField i)
Set the informationField member


setConnectionField

public void setConnectionField(ConnectionField c)
Set the connectionField member


addBandwidthField

public void addBandwidthField(BandwidthField b)
Set the bandwidthField member


setKeyField

public void setKeyField(KeyField k)
Set the keyField member


setAttributeFields

public void setAttributeFields(java.util.Vector a)
Set the attributeFields member


getMedia

public javax.sdp.Media getMedia()
Return the Media field of the description.

定義:
インタフェース javax.sdp.MediaDescription 内の getMedia
戻り値:
the Media field of the description.

setMedia

public void setMedia(javax.sdp.Media media)
              throws javax.sdp.SdpException
Set the Media field of the description.

定義:
インタフェース javax.sdp.MediaDescription 内の setMedia
パラメータ:
media - to set
例外:
javax.sdp.SdpException - if the media field is null

getInfo

public javax.sdp.Info getInfo()
Returns value of the info field (i=) of this object.

定義:
インタフェース javax.sdp.MediaDescription 内の getInfo
戻り値:
value of the info field (i=) of this object.

setInfo

public void setInfo(javax.sdp.Info i)
             throws javax.sdp.SdpException
Sets the i= field of this object.

定義:
インタフェース javax.sdp.MediaDescription 内の setInfo
パラメータ:
i - to set
例外:
javax.sdp.SdpException - if the info is null

getConnection

public javax.sdp.Connection getConnection()
Returns the connection information associated with this object. This may be null for SessionDescriptions if all Media objects have a connection object and may be null for Media objects if the corresponding session connection is non-null.

定義:
インタフェース javax.sdp.MediaDescription 内の getConnection
戻り値:
connection

setConnection

public void setConnection(javax.sdp.Connection conn)
                   throws javax.sdp.SdpException
Set the connection data for this entity

定義:
インタフェース javax.sdp.MediaDescription 内の setConnection
パラメータ:
conn - to set
例外:
javax.sdp.SdpException - if the connexion is null

getBandwidths

public java.util.Vector getBandwidths(boolean create)
Returns the Bandwidth of the specified type.

定義:
インタフェース javax.sdp.MediaDescription 内の getBandwidths
パラメータ:
create - type of the Bandwidth to return
戻り値:
the Bandwidth or null if undefined

setBandwidths

public void setBandwidths(java.util.Vector bandwidths)
                   throws javax.sdp.SdpException
set the value of the Bandwidth with the specified type

定義:
インタフェース javax.sdp.MediaDescription 内の setBandwidths
パラメータ:
bandwidths - type of the Bandwidth object whose value is requested
例外:
javax.sdp.SdpException - if vector is null

getBandwidth

public int getBandwidth(java.lang.String name)
                 throws javax.sdp.SdpParseException
Returns the integer value of the specified bandwidth name.

定義:
インタフェース javax.sdp.MediaDescription 内の getBandwidth
パラメータ:
name - the name of the bandwidth type.
戻り値:
the value of the named bandwidth
例外:
javax.sdp.SdpParseException

setBandwidth

public void setBandwidth(java.lang.String name,
                         int value)
                  throws javax.sdp.SdpException
Sets the value of the specified bandwidth type.

定義:
インタフェース javax.sdp.MediaDescription 内の setBandwidth
パラメータ:
name - the name of the bandwidth type.
value - the value of the named bandwidth type.
例外:
javax.sdp.SdpException - if the name is null

removeBandwidth

public void removeBandwidth(java.lang.String name)
Removes the specified bandwidth type.

定義:
インタフェース javax.sdp.MediaDescription 内の removeBandwidth
パラメータ:
name - the name of the bandwidth type.

getKey

public javax.sdp.Key getKey()
Returns the key data.

定義:
インタフェース javax.sdp.MediaDescription 内の getKey
戻り値:
the key data.

setKey

public void setKey(javax.sdp.Key key)
            throws javax.sdp.SdpException
Sets encryption key information. This consists of a method and an encryption key included inline.

定義:
インタフェース javax.sdp.MediaDescription 内の setKey
パラメータ:
key - the encryption key data; depending on method may be null
例外:
javax.sdp.SdpException - if the key is null

getAttributes

public java.util.Vector getAttributes(boolean create)
Returns the set of attributes for this Description as a Vector of Attribute objects in the order they were parsed.

定義:
インタフェース javax.sdp.MediaDescription 内の getAttributes
パラメータ:
create - specifies whether to return null or a new empty Vector in case no attributes exists for this Description
戻り値:
attributes for this Description

setAttributes

public void setAttributes(java.util.Vector attributes)
                   throws javax.sdp.SdpException
Adds the specified Attribute to this Description object.

定義:
インタフェース javax.sdp.MediaDescription 内の setAttributes
パラメータ:
Attributes - the attribute to add
例外:
javax.sdp.SdpException - if the attributes is null

getAttribute

public java.lang.String getAttribute(java.lang.String name)
                              throws javax.sdp.SdpParseException
Returns the value of the specified attribute.

定義:
インタフェース javax.sdp.MediaDescription 内の getAttribute
パラメータ:
name - the name of the attribute.
戻り値:
the value of the named attribute
例外:
javax.sdp.SdpParseException

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws javax.sdp.SdpException
Sets the value of the specified attribute

定義:
インタフェース javax.sdp.MediaDescription 内の setAttribute
パラメータ:
name - the name of the attribute.
value - the value of the named attribute.
例外:
javax.sdp.SdpException - if the parameters are null

removeAttribute

public void removeAttribute(java.lang.String name)
Removes the attribute specified by the value parameter.

定義:
インタフェース javax.sdp.MediaDescription 内の removeAttribute
パラメータ:
name - the name of the attribute.

getMimeTypes

public java.util.Vector getMimeTypes()
                              throws javax.sdp.SdpException
Returns a Vector containing a string indicating the MIME type for each of the codecs in this description. A MIME value is computed for each codec in the media description. The MIME type is computed in the following fashion: The type is the mediaType from the media field. The subType is determined by the protocol. The result is computed as the string of the form: type + '/' + subType The subType portion is computed in the following fashion. RTP/AVP the subType is returned as the codec name. This will either be extracted from the rtpmap attribute or computed. other the protocol is returned as the subType. If the protocol is RTP/AVP and the rtpmap attribute for a codec is absent, then the codec name will be computed in the following fashion. String indexed in table SdpConstants.avpTypeNames if the value is an int greater than or equal to 0 and less than AVP_DEFINED_STATIC_MAX, and has been assigned a value. SdpConstant.RESERVED if the value is an int greater than or equal to 0 and less than AVP_DEFINED_STATIC_MAX, and has not been assigned a value. SdpConstant.UNASSIGNED An int greater than or equal to AVP_DEFINED_STATIC_MAX and less than AVP_DYNAMIC_MIN - currently unassigned. SdpConstant.DYNAMIC Any int less than 0 or greater than or equal to AVP_DYNAMIC_MIN

定義:
インタフェース javax.sdp.MediaDescription 内の getMimeTypes
戻り値:
a Vector containing a string indicating the MIME type for each of the codecs in this description
例外:
javax.sdp.SdpException - if there is a problem extracting the parameters.

getMimeParameters

public java.util.Vector getMimeParameters()
                                   throws javax.sdp.SdpException
Returns a Vector containing a string of parameters for each of the codecs in this description. A parameter string is computed for each codec. The parameter string is computed in the following fashion. The rate is extracted from the rtpmap or static data. The number of channels is extracted from the rtpmap or static data. The ptime is extracted from the ptime attribute. The maxptime is extracted from the maxptime attribute. Any additional parameters are extracted from the ftmp attribute.

定義:
インタフェース javax.sdp.MediaDescription 内の getMimeParameters
戻り値:
a Vector containing a string of parameters for each of the codecs in this description.
例外:
javax.sdp.SdpException - if there is a problem extracting the parameters.

addDynamicPayloads

public void addDynamicPayloads(java.util.Vector payloadNames,
                               java.util.Vector payloadValues)
                        throws javax.sdp.SdpException
Adds dynamic media types to the description.

定義:
インタフェース javax.sdp.MediaDescription 内の addDynamicPayloads
パラメータ:
payloadNames - a Vector of String - each one the name of a dynamic payload to be added (usually an integer larger than SdpConstants.AVP_DYNAMIC_MIN).
payloadValues - a Vector of String - each contains the value describing the correlated dynamic payloads to be added
例外:
javax.sdp.SdpException - if either vector is null or empty. if the vector sizes are unequal.