|
MjSip Stack v1.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.zoolu.sdp.SessionDescriptor
Class SessionDescriptor handles SIP message bodys formatted according to the Session Description Protocol (SDP).
A session description consists of a session-level description (details that apply to the whole session and all media streams) and zero or more media-level descriptions (details that apply onto to a single media stream).
The session-level part starts with a `v=' line and continues to the first media-level section. The media description starts with an `m=' line and continues to the next media description or end of the whole session description. In general, session-level values are the default for all media unless overridden by an equivalent media-level value.
In the current implementation, the session-level description consists of the v, o, s, c, and t SDP fields (lines).
| Constructor Summary | |
SessionDescriptor()
Creates a default SessionDescriptor. |
|
SessionDescriptor(OriginField origin,
SessionNameField session,
ConnectionField connection,
TimeField time)
Creates a new SessionDescriptor specifing o, s, c, and t fields. |
|
SessionDescriptor(SessionDescriptor sd)
Creates a new SessionDescriptor. |
|
SessionDescriptor(java.lang.String sdp)
Creates a new SessionDescriptor from String sdp |
|
SessionDescriptor(java.lang.String owner,
java.lang.String address)
Creates a new SessionDescriptor. |
|
SessionDescriptor(java.lang.String origin,
java.lang.String session,
java.lang.String connection,
java.lang.String time)
Creates a new SessionDescriptor specifing o, s, c, and t fields. |
|
| Method Summary | |
SessionDescriptor |
addAttribute(AttributeField attribute)
Adds a new attribute |
SessionDescriptor |
addAttributes(java.util.Vector attribute_fields)
Adds a Vector of session attributes. |
SessionDescriptor |
addMedia(MediaField media,
AttributeField attribute)
Adds a new attribute for a particular media |
SessionDescriptor |
addMedia(MediaField media,
java.util.Vector attributes)
Adds a new media. |
SessionDescriptor |
addMediaDescriptor(MediaDescriptor media_desc)
Adds a new MediaDescriptor |
SessionDescriptor |
addMediaDescriptors(java.util.Vector media_descs)
Adds a Vector of MediaDescriptors |
AttributeField |
getAttribute(java.lang.String attribute_name)
Gets the first AttributeField of a particular attribute name. |
java.util.Vector |
getAttributes()
Gets a Vector of attribute values. |
java.util.Vector |
getAttributes(java.lang.String attribute_name)
Gets a Vector of attribute values of a particular attribute name. |
ConnectionField |
getConnection()
Gets the connection-information 'c' field |
MediaDescriptor |
getMediaDescriptor(java.lang.String media_type)
Gets the first MediaDescriptor of a particular media. |
java.util.Vector |
getMediaDescriptors()
Gets all MediaDescriptors |
OriginField |
getOrigin()
Gets the origin 'o' field |
SessionNameField |
getSessionName()
Gets the session-name 's' field |
TimeField |
getTime()
Gets the time 't' field |
boolean |
hasAttribute(java.lang.String attribute_name)
Whether it has a particular attribute |
SessionDescriptor |
removeAttributes()
Removes all session attributes. |
SessionDescriptor |
removeMediaDescriptor(java.lang.String media_type)
Removes all MediaDescriptors |
SessionDescriptor |
removeMediaDescriptors()
Removes all MediaDescriptors |
SessionDescriptor |
setConnection(ConnectionField connection)
Sets the connection-information 'c' field. |
SessionDescriptor |
setOrigin(OriginField origin)
Sets the origin 'o' field. |
SessionDescriptor |
setSessionName(SessionNameField session)
Sets the session-name 's' field. |
SessionDescriptor |
setTime(TimeField time)
Sets the time 't' field. |
java.lang.String |
toString()
Gets a String rapresentation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SessionDescriptor(SessionDescriptor sd)
sd - the SessionDescriptor clone
public SessionDescriptor(OriginField origin,
SessionNameField session,
ConnectionField connection,
TimeField time)
origin - the OriginFieldsession - the SessionNameFieldconnection - the ConnectionFieldtime - the TimeField
public SessionDescriptor(java.lang.String origin,
java.lang.String session,
java.lang.String connection,
java.lang.String time)
origin - the origin valuesession - the session valueconnection - the connection valuetime - the time value
public SessionDescriptor(java.lang.String owner,
java.lang.String address)
with:
o=owner
s=Session SIP/SDP
c=IP4 address
t=0 0
if address==null, '127.0.0.1' is used
if owner==null, 'user@'address is used
owner - the owneraddress - the IPv4 addresspublic SessionDescriptor()
o=user@127.0.0.1 s=Session SIP/SDP c=127.0.0.1 t=0 0
public SessionDescriptor(java.lang.String sdp)
sdp - the entire SDP| Method Detail |
public SessionDescriptor setOrigin(OriginField origin)
origin - the OriginFieldpublic OriginField getOrigin()
public SessionDescriptor setSessionName(SessionNameField session)
session - the SessionNameFieldpublic SessionNameField getSessionName()
public SessionDescriptor setConnection(ConnectionField connection)
connection - the ConnectionFieldpublic ConnectionField getConnection()
public SessionDescriptor setTime(TimeField time)
time - the TimeFieldpublic TimeField getTime()
public SessionDescriptor addMedia(MediaField media,
AttributeField attribute)
media - the MediaFieldattribute - an AttributeField
public SessionDescriptor addMedia(MediaField media,
java.util.Vector attributes)
media - the MediaFieldattributes - Vector of AttributeFieldpublic SessionDescriptor addMediaDescriptor(MediaDescriptor media_desc)
media_desc - a MediaDescriptorpublic SessionDescriptor addMediaDescriptors(java.util.Vector media_descs)
media_descs - Vector if MediaDescriptorpublic java.util.Vector getMediaDescriptors()
public SessionDescriptor removeMediaDescriptor(java.lang.String media_type)
public SessionDescriptor removeMediaDescriptors()
public MediaDescriptor getMediaDescriptor(java.lang.String media_type)
media_type - the media typepublic SessionDescriptor addAttributes(java.util.Vector attribute_fields)
attribute_fields - Vector of AttributeFieldspublic SessionDescriptor addAttribute(AttributeField attribute)
attribute - the new AttributeFieldpublic SessionDescriptor removeAttributes()
public java.util.Vector getAttributes()
public boolean hasAttribute(java.lang.String attribute_name)
a_name - the attribute namepublic AttributeField getAttribute(java.lang.String attribute_name)
attribute_name - the attribute namepublic java.util.Vector getAttributes(java.lang.String attribute_name)
a_name - the attribute namepublic java.lang.String toString()
toString in class java.lang.Object
|
MjSip Stack v1.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||