public class SessionDescriptionImpl extends Object implements SessionDescription
Modifier and Type | Field and Description |
---|---|
protected Vector |
attributesList |
protected Vector |
bandwidthList |
protected ConnectionField |
connectionImpl |
protected Vector |
emailList |
protected InformationField |
infoImpl |
protected KeyField |
keyImpl |
protected Vector |
mediaDescriptions |
protected OriginField |
originImpl |
protected Vector |
phoneList |
protected SessionNameField |
sessionNameImpl |
protected Vector |
timeDescriptions |
protected URIField |
uriImpl |
protected ProtoVersionField |
versionImpl |
protected Vector |
zoneAdjustments |
Constructor and Description |
---|
SessionDescriptionImpl()
Creates new SessionDescriptionImpl
|
SessionDescriptionImpl(SessionDescription otherSessionDescription)
Copy constructor, creates a deep copy of another SessionDescription.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(SDPField sdpField) |
Object |
clone()
Creates and returns a deep copy of this object
|
String |
getAttribute(String name)
Returns the value of the specified attribute.
|
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(String name)
Returns the integer value of the specified bandwidth name.
|
Vector |
getBandwidths(boolean create)
Returns the Bandwidth of the specified type.
|
Connection |
getConnection()
Returns the connection information associated with this object.
|
Vector |
getEmails(boolean create)
Returns an email address to contact for further information about the
session.
|
Info |
getInfo()
Returns value of the info field (i=) of this object.
|
Key |
getKey()
Returns the key data.
|
Vector |
getMediaDescriptions(boolean create)
Adds a MediaDescription to the session description.
|
Origin |
getOrigin()
Returns information about the originator of the session.
|
Vector |
getPhones(boolean create)
Returns a phone number to contact for further information about the
session.
|
SessionName |
getSessionName()
Returns the name of the session.
|
Vector |
getTimeDescriptions(boolean create)
Returns a TimeField indicating the start, stop, repetition and time zone
information of the session.
|
URI |
getURI()
Returns a uri to the location of more details about the session.
|
Version |
getVersion()
Returns the version of SDP in use.
|
Vector |
getZoneAdjustments(boolean create)
Returns the time zone adjustments for the Session
|
void |
removeAttribute(String name)
Removes the attribute specified by the value parameter.
|
void |
removeBandwidth(String name)
Removes the specified bandwidth type.
|
void |
setAttribute(String name,
String value)
Sets the value of the specified attribute.
|
void |
setAttributes(Vector attributes)
Adds the specified Attribute to this Description object.
|
void |
setBandwidth(String name,
int value)
Sets the value of the specified bandwidth type.
|
void |
setBandwidths(Vector bandwidthList)
set the value of the Bandwidth with the specified type.
|
void |
setConnection(Connection conn)
Set the connection data for this entity.
|
void |
setEmails(Vector emails)
Sets a an email address to contact for further information about the
session.
|
void |
setInfo(Info i)
Sets the i= field of this object.
|
void |
setKey(Key key)
Sets encryption key information.
|
void |
setMediaDescriptions(Vector mediaDescriptions)
Removes all MediaDescriptions from the session description.
|
void |
setOrigin(Origin origin)
Sets information about the originator of the session.
|
void |
setPhones(Vector phones)
Sets a phone number to contact for further information about the session.
|
void |
setSessionName(SessionName sessionName)
Sets the name of the session.
|
void |
setTimeDescriptions(Vector times)
Sets a TimeField indicating the start, stop, repetition and time zone
information of the session.
|
void |
setURI(URI uri)
Sets the uri to the location of more details about the session.
|
void |
setVersion(Version v)
Sets the version of SDP in use.
|
void |
setZoneAdjustments(Vector zoneAdjustments)
Sets the time zone adjustment for the TimeField.
|
String |
toString()
Returns the canonical string representation of the current
SessionDescrption.
|
protected ProtoVersionField versionImpl
protected OriginField originImpl
protected SessionNameField sessionNameImpl
protected InformationField infoImpl
protected URIField uriImpl
protected ConnectionField connectionImpl
protected KeyField keyImpl
protected Vector timeDescriptions
protected Vector mediaDescriptions
protected Vector zoneAdjustments
protected Vector emailList
protected Vector phoneList
protected Vector bandwidthList
protected Vector attributesList
public SessionDescriptionImpl()
public SessionDescriptionImpl(SessionDescription otherSessionDescription) throws SdpException
otherSessionDescription
- - the SessionDescription to copy from.SdpException
- - if there is a problem constructing the SessionDescription.public void addField(SDPField sdpField) throws ParseException
ParseException
public Object clone() throws CloneNotSupportedException
clone
in interface SessionDescription
clone
in class Object
CloneNotSupportedException
- if this instance cannot be cloned.public Version getVersion()
getVersion
in interface SessionDescription
public void setVersion(Version v) throws SdpException
setVersion
in interface SessionDescription
v
- version - the integer version.SdpException
- if the version is nullpublic Origin getOrigin()
getOrigin
in interface SessionDescription
public void setOrigin(Origin origin) throws SdpException
setOrigin
in interface SessionDescription
origin
- origin - the originator data.SdpException
- if the origin is nullpublic SessionName getSessionName()
getSessionName
in interface SessionDescription
public void setSessionName(SessionName sessionName) throws SdpException
setSessionName
in interface SessionDescription
sessionName
- name - the session name.SdpException
- if the sessionName is nullpublic Info getInfo()
getInfo
in interface SessionDescription
public void setInfo(Info i) throws SdpException
setInfo
in interface SessionDescription
i
- s - new i= value; if null removes the fieldSdpException
- if the info is nullpublic URI getURI()
getURI
in interface SessionDescription
public void setURI(URI uri) throws SdpException
setURI
in interface SessionDescription
uri
- uri - the uri.SdpException
- if the uri is nullpublic Vector getEmails(boolean create) throws SdpParseException
getEmails
in interface SessionDescription
create
- boolean to setSdpParseException
public void setEmails(Vector emails) throws SdpException
setEmails
in interface SessionDescription
emails
- email - the email address.SdpException
- if the vector is nullpublic Vector getPhones(boolean create) throws SdpException
getPhones
in interface SessionDescription
create
- boolean to setSdpException
public void setPhones(Vector phones) throws SdpException
setPhones
in interface SessionDescription
phones
- phone - the phone number.SdpException
- if the vector is nullpublic Vector getTimeDescriptions(boolean create) throws SdpException
getTimeDescriptions
in interface SessionDescription
create
- boolean to setSdpException
public void setTimeDescriptions(Vector times) throws SdpException
setTimeDescriptions
in interface SessionDescription
times
- time - the TimeField.SdpException
- if the vector is nullpublic Vector getZoneAdjustments(boolean create) throws SdpException
getZoneAdjustments
in interface SessionDescription
create
- boolean to setSdpException
public void setZoneAdjustments(Vector zoneAdjustments) throws SdpException
setZoneAdjustments
in interface SessionDescription
zoneAdjustments
- zoneAdjustments - a Hashtable containing the zone adjustments,
where the key is the Adjusted Time Zone and the value is the
offset.SdpException
- if the vector is nullpublic Connection getConnection()
getConnection
in interface SessionDescription
public void setConnection(Connection conn) throws SdpException
setConnection
in interface SessionDescription
conn
- to setSdpException
- if the parameter is nullpublic Vector getBandwidths(boolean create)
getBandwidths
in interface SessionDescription
create
- type - type of the Bandwidth to returnpublic void setBandwidths(Vector bandwidthList) throws SdpException
setBandwidths
in interface SessionDescription
bandwidthList
- to setSdpException
- if the vector is nullpublic int getBandwidth(String name) throws SdpParseException
getBandwidth
in interface SessionDescription
name
- name - the name of the bandwidth typeSdpParseException
public void setBandwidth(String name, int value) throws SdpException
setBandwidth
in interface SessionDescription
name
- name - the name of the bandwidth type.value
- value - the value of the named bandwidth type.SdpException
- if the name is nullpublic void removeBandwidth(String name)
removeBandwidth
in interface SessionDescription
name
- name - the name of the bandwidth typepublic Key getKey()
getKey
in interface SessionDescription
public void setKey(Key key) throws SdpException
setKey
in interface SessionDescription
key
- key - the encryption key data; depending on method may be nullSdpException
- if the parameter is nullpublic String getAttribute(String name) throws SdpParseException
getAttribute
in interface SessionDescription
name
- name - the name of the attributeSdpParseException
public Vector getAttributes(boolean create)
getAttributes
in interface SessionDescription
create
- create - specifies whether to return null or a new empty
Vector in case no attributes exists for this Descriptionpublic void removeAttribute(String name)
removeAttribute
in interface SessionDescription
name
- name - the name of the attributepublic void setAttribute(String name, String value) throws SdpException
setAttribute
in interface SessionDescription
name
- name - the name of the attribute.value
- value - the value of the named attribute.SdpException
- if the name or the value is nullpublic void setAttributes(Vector attributes) throws SdpException
setAttributes
in interface SessionDescription
attributes
- - the attribute to addSdpException
- if the vector is nullpublic Vector getMediaDescriptions(boolean create) throws SdpException
getMediaDescriptions
in interface SessionDescription
create
- boolean to setSdpException
public void setMediaDescriptions(Vector mediaDescriptions) throws SdpException
setMediaDescriptions
in interface SessionDescription
mediaDescriptions
- to setSdpException
- if the parameter is nullCopyright © 2018. All Rights Reserved.