|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jsdp.SessionDescription
public class SessionDescription
A SessionDescription represents the data defined by the Session Description Protocol.
The session description holds information about the originator of a session, the media types that a client can support and the host and port on which the client will listen for that media. It also holds timing information for the session (e.g. start, end, repeat, time zone) and bandwidth supported for the session.
For further information please refer to RFC 4566.
TimeDescription
,
MediaDescription
,
Serialized FormField Summary | |
---|---|
protected HashMap |
attributes
The attribute fields |
protected HashMap |
bandwiths
The bandwith fields |
protected Connection |
c
The connection field |
protected ArrayList |
emails
The email fields |
protected Information |
i
The information field |
protected Key |
k
The key field |
protected ArrayList |
mediaDescriptions
The media descriptions |
protected Origin |
o
The origin field |
protected ArrayList |
phones
The phone fields |
protected SessionName |
s
The session name field |
protected ArrayList |
timeDescriptions
The time descriptions |
protected Uri |
u
The uri field |
protected Version |
v
The version field |
protected TimeZone |
z
The time zone field |
Constructor Summary | |
---|---|
protected |
SessionDescription()
Creates a SessionDescription. |
protected |
SessionDescription(SessionDescription sd)
Creates a SessionDescription. |
|
SessionDescription(Version v,
Origin o,
SessionName s,
TimeDescription td)
Creates a SessionDescription. |
Method Summary | |
---|---|
void |
addAttribute(Attribute field)
Adds an attribute field. |
void |
addBandwith(Bandwith bandwith)
Adds a bandwith field. |
void |
addEmail(Email field)
Adds an email field. |
void |
addMediaDescription(MediaDescription md)
Adds a media description. |
void |
addPhone(Phone field)
Adds a phone field. |
void |
addTimeDescription(TimeDescription td)
Adds a time description. |
void |
clearAttributes()
Remove all attribute fields contained in the description. |
void |
clearBandwiths()
Remove all bandwith fields contained in the session description. |
void |
clearEmails()
Remove all email fields contained in the session description. |
void |
clearMediaDescriptions()
Remove all media descriptions contained in the session description. |
void |
clearPhones()
Remove all phone fields contained in the session description. |
Object |
clone()
Returns a clone of this description. |
Attribute |
getAttribute(String name)
Returns the attribute with the specified name. |
Attribute |
getAttribute(String name,
int index)
Returns a specified occurence of an attribute with the specified name. |
Attribute[] |
getAttributes()
Returns all attribute fields. |
Attribute[] |
getAttributes(String name)
Returns the attributes with the specified name. |
int |
getAttributesCount(String name)
Returns the number of attributes with a specified name |
Bandwith |
getBandwith(String modifier)
Returns the bandwith field with a specified modifier. |
Bandwith[] |
getBandwiths()
Returns the bandwith fields. |
Connection |
getConnection()
Returns the connection field. |
Email[] |
getEmails()
Returns the email fields. |
Information |
getInformation()
Returns the information field. |
Key |
getKey()
Returns the key field. |
MediaDescription[] |
getMediaDescriptions()
Returns the media descriptions. |
int |
getMediaDescriptionsCount()
Returns the number of media descriptions. |
Origin |
getOrigin()
Returns the origin field. |
Phone[] |
getPhones()
Returns the phone fields. |
SessionName |
getSessionName()
Returns the session name field. |
TimeDescription[] |
getTimeDescriptions()
Returns the time descriptions. |
TimeZone |
getTimeZone()
Returns the time zone field. |
Uri |
getUri()
Returns the uri field. |
Version |
getVersion()
Returns the version field. |
boolean |
hasAttribute(String name)
Indicates if an attribute with a specified name is present. |
boolean |
hasConnection()
Indicates if the connection field is present. |
boolean |
hasEmails()
Indicates if one or more email fields are present. |
boolean |
hasInformation()
Indicates if the information field is present. |
boolean |
hasKey()
Indicates if the encryption key field is present. |
boolean |
hasPhones()
Indicates if one or more phone fields are present. |
boolean |
hasTimeZone()
Indicates if the timezone field is present. |
boolean |
hasUri()
Indicates if the uri field is present |
Attribute |
removeAttribute(String name)
Removes the attribute field with an associated name. |
Attribute |
removeAttribute(String name,
int index)
Removes a specified occurence of an attribute with the specified name. |
Attribute[] |
removeAttributes(String name)
Remove all occurencies of attributes with the specified name. |
Bandwith |
removeBandwith(String modifier)
Remove the bandwith field with an associated modifier |
void |
setAttributes(Attribute[] fields)
Set attribute fields. |
void |
setBandwiths(Bandwith[] fields)
Set bandwith fields. |
void |
setConnection(Connection c)
Sets the connection field. |
void |
setEmails(Email[] fields)
Sets email fields. |
void |
setInformation(Information i)
Sets the information field. |
void |
setKey(Key k)
Sets the encryption key field. |
void |
setMediaDescriptions(MediaDescription[] descriptions)
Sets media descriptions. |
void |
setOrigin(Origin o)
Sets the origin field. |
void |
setPhones(Phone[] fields)
Sets phone fields. |
void |
setSessionName(SessionName s)
Sets session name field. |
void |
setTimeDescriptions(TimeDescription[] descriptions)
Sets time descriptions. |
void |
setTimeZone(TimeZone z)
Sets the timezone field. |
void |
setUri(Uri u)
Sets the uri field. |
void |
setVersion(Version v)
Sets the version field. |
String |
toString()
Returns a string representation of this description. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Version v
protected Origin o
protected SessionName s
protected Information i
protected Uri u
protected ArrayList emails
protected ArrayList phones
protected Connection c
protected HashMap bandwiths
protected ArrayList timeDescriptions
protected TimeZone z
protected Key k
protected HashMap attributes
protected ArrayList mediaDescriptions
Constructor Detail |
---|
protected SessionDescription()
protected SessionDescription(SessionDescription sd)
sd
- the SessionDescription to clonepublic SessionDescription(Version v, Origin o, SessionName s, TimeDescription td) throws IllegalArgumentException
v
- the version fieldo
- the origin fields
- the session name fieldtd
- the time description
IllegalArgumentException
- if one or more parameters are
nullMethod Detail |
---|
public void addAttribute(Attribute field) throws IllegalArgumentException
field
- the attribute field to set
IllegalArgumentException
- if the field is nullpublic void addBandwith(Bandwith bandwith) throws IllegalArgumentException
bandwith
- the bandwith field to set
IllegalArgumentException
- if the bandwith field is nullpublic void addEmail(Email field) throws IllegalArgumentException
field
- the email field to add
IllegalArgumentException
- if the field is nullpublic void addMediaDescription(MediaDescription md) throws IllegalArgumentException, SDPException
md
- the media description to add
IllegalArgumentException
- if the media description is
null
SDPException
- if both session and media description doesn't have a
connection fieldpublic void addPhone(Phone field) throws IllegalArgumentException
field
- the phone field to add
IllegalArgumentException
- tf the field is nullpublic void addTimeDescription(TimeDescription td) throws IllegalArgumentException
td
- the time description to set
IllegalArgumentException
- if the description is nullpublic void clearAttributes()
public void clearBandwiths()
public void clearEmails()
public void clearMediaDescriptions()
public void clearPhones()
public Object clone()
clone
in interface Description
clone
in class Object
public Attribute[] getAttributes()
public Attribute getAttribute(String name)
name
- the name of the attribute
public Attribute getAttribute(String name, int index)
name
- the name of the attributeindex
- the occurence index
public Attribute[] getAttributes(String name)
If there is only an occurence of that attribute the length of returned array is 1, instead if there aren't attributes with the given name the length of returned array is 0
name
- the name of the attribute
public int getAttributesCount(String name)
name
- the name of the attribute
public Bandwith getBandwith(String modifier)
modifier
- the bandwith modifier
public Bandwith[] getBandwiths()
public Connection getConnection()
public Email[] getEmails()
public Information getInformation()
public Key getKey()
public MediaDescription[] getMediaDescriptions()
public int getMediaDescriptionsCount()
public Origin getOrigin()
public Phone[] getPhones()
public SessionName getSessionName()
public TimeDescription[] getTimeDescriptions()
public TimeZone getTimeZone()
public Uri getUri()
public Version getVersion()
public boolean hasAttribute(String name)
name
- the name of the attribute
public boolean hasConnection()
public boolean hasEmails()
public boolean hasInformation()
public boolean hasKey()
public boolean hasPhones()
public boolean hasTimeZone()
public boolean hasUri()
public Attribute removeAttribute(String name)
name
- the name of the attribute field to remove
public Attribute removeAttribute(String name, int index)
name
- the name of the attributeindex
- the occurence index
public Attribute[] removeAttributes(String name)
name
- the name of the attributepublic Bandwith removeBandwith(String modifier)
modifier
- the modifier associated to the bandwith field to remove
public void setAttributes(Attribute[] fields)
fields
- the fields to set
IllegalArgumentException
- if one or more field are nullpublic void setBandwiths(Bandwith[] fields)
fields
- the fields to set
IllegalArgumentException
- if one or more field are nullpublic void setConnection(Connection c)
c
- the connection field to setpublic void setEmails(Email[] fields) throws IllegalArgumentException
fields
- the email fields to set
IllegalArgumentException
- if one or more field are nullpublic void setInformation(Information i)
i
- the information field to setpublic void setKey(Key k)
k
- the encryption key field to setpublic void setMediaDescriptions(MediaDescription[] descriptions) throws IllegalArgumentException, SDPException
descriptions
- the media descriptions to set
IllegalArgumentException
- if one or more descriptions are
null
SDPException
public void setOrigin(Origin o) throws IllegalArgumentException
o
- the origin field to set
IllegalArgumentException
- if the field is nullpublic void setPhones(Phone[] fields) throws IllegalArgumentException
fields
- the phone fields to set
IllegalArgumentException
- if one or more phone fields are
nullpublic void setSessionName(SessionName s) throws IllegalArgumentException
s
- the session name field to set
IllegalArgumentException
- if the field is nullpublic void setTimeDescriptions(TimeDescription[] descriptions) throws IllegalArgumentException
descriptions
- the time descriptions to set
IllegalArgumentException
- if one or more description are
nullpublic void setTimeZone(TimeZone z)
z
- the timezone field to setpublic void setUri(Uri u)
u
- the uri field to setpublic void setVersion(Version v) throws IllegalArgumentException
v
- the version field to set
IllegalArgumentException
- if the field is nullpublic String toString()
toString
in interface Description
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |