All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.sap.SapSession

java.lang.Object
   |
   +----w3c.www.sap.SapSession

public class SapSession
extends Object

Variable Index

 o asbw
SAP Application Specific bandwidth in kb per sec.
 o attrs
SAP attributes.
 o caddr
SAP connection address.
 o caddrtype
SAP connection address type.
 o cnaddr
SAP number of multicast groups.
 o ctbw
SAP Conference Total bandwidth in kb per sec.
 o cttl
SAP connection time to live.
 o deleted
Has this session been deleted ?
 o emails
SAP owner email address.
 o hasConnection
Does this SAP session has asssociated connection data ?
 o infos
SAP session informations.
 o medias
SAP medias.
 o name
SAP session name.
 o phones
SAP owner email address.
 o saddr
SAP session address.
 o saddrtype
SAP session address type.
 o SDP_VERSION
The SDP version understood by this class.
 o sid
SAP session identifier.
 o snettype
SAP session network type.
 o startTime
SAP session start time (NTP).
 o stopTime
SAP session stop time.
 o sversion
SAP session version.
 o urls
SAP associated URL.
 o version
SDP version currently used.

Method Index

 o addAttribute(String, String)
Add an attribute to that media description.
 o addInfo(String)
Add more info.
 o addMail(String)
Add an email location.
 o addMedia(SapMedia)
Add a media to that session.
 o addPhone(String)
Add a phone location.
 o addURL(String)
Add an URL for the session.
 o createMedia(String, int, int, String, String[])
Add a media description to that session.
 o enumerateMedias()
Enumerate all medias available on that session.
 o getAttributeValue(String)
Get the first value of an attribute.
 o getAttributeValues(String)
Get all mappings of an attribute.
 o getIdentifier()
Get that session uniq identifier.
 o getOwner()
Get the ownership field, formatted for SDP.
 o getTimeToLive()
Get the max TTL for that session.
 o isDeleted()
Has this session been deleted ?
 o parse(byte[], int, int)
Parse the given packet as a single session announcement.
 o parse(InputStream)
Read next line of SAP stream.
 o removeAttribute(String)
Remove an attribute definition.
 o removeMedia(SapMedia)
Remove that media from the session.
 o setConnectionData(String, String, InetAddress, int, int)
Set this session's connection data.
 o setDeleted(boolean)
Set this session deletion status.
 o setTimes(long, long)
Set start and stop time for the session.
 o toByteArray()
Generate a buffer to announce that session.
 o toString()
Convert that session description to a String.

Variables

 o SDP_VERSION
 public static final int SDP_VERSION
The SDP version understood by this class.

 o version
 protected int version
SDP version currently used.

 o sid
 protected long sid
SAP session identifier.

 o sversion
 protected long sversion
SAP session version.

 o snettype
 protected String snettype
SAP session network type.

 o saddrtype
 protected String saddrtype
SAP session address type.

 o saddr
 protected InetAddress saddr
SAP session address.

 o name
 protected String name
SAP session name.

 o infos
 protected String infos[]
SAP session informations.

 o urls
 protected String urls[]
SAP associated URL.

 o emails
 protected String emails[]
SAP owner email address.

 o phones
 protected String phones[]
SAP owner email address.

 o hasConnection
 protected boolean hasConnection
Does this SAP session has asssociated connection data ?

 o caddrtype
 protected String caddrtype
SAP connection address type.

 o caddr
 protected InetAddress caddr
SAP connection address.

 o cttl
 protected int cttl
SAP connection time to live.

 o cnaddr
 protected int cnaddr
SAP number of multicast groups.

 o ctbw
 protected int ctbw
SAP Conference Total bandwidth in kb per sec.

 o asbw
 protected int asbw
SAP Application Specific bandwidth in kb per sec.

 o startTime
 protected long startTime
SAP session start time (NTP).

 o stopTime
 protected long stopTime
SAP session stop time.

 o attrs
 protected SapAttributes attrs
SAP attributes.

 o medias
 protected Vector medias
SAP medias.

 o deleted
 protected boolean deleted
Has this session been deleted ?

Methods

 o toString
 public String toString()
Convert that session description to a String.

Returns:
A String instance
Overrides:
toString in class Object
 o addMedia
 protected void addMedia(SapMedia media)
Add a media to that session.

Parameters:
media - The media to add to this session.
 o toByteArray
 public byte[] toByteArray()
Generate a buffer to announce that session.

Returns:
A byte array containing the formatted data to be emited on the wire.
 o parse
 public void parse(InputStream input) throws IOException, SapProtocolException
Read next line of SAP stream.

Returns:
A String containing the next line of input.
Throws: IOException
If IO error when reading from stream.
 o parse
 protected void parse(byte buf[],
                      int off,
                      int len) throws SapProtocolException
Parse the given packet as a single session announcement.

Parameters:
p - The DatagramPacket to parse.
Throws: SapProtocolException
If given data doesn't conform to SDP.
See Also:
SDP
 o setDeleted
 protected void setDeleted(boolean onoff)
Set this session deletion status.

Parameters:
onoff - The toggle value.
 o getIdentifier
 public long getIdentifier()
Get that session uniq identifier.

Returns:
A long uniq session identifier.
 o enumerateMedias
 public Enumeration enumerateMedias()
Enumerate all medias available on that session.

Returns:
An Enumeration instance.
 o createMedia
 public SapMedia createMedia(String media,
                             int port,
                             int nport,
                             String transport,
                             String formats[])
Add a media description to that session.

Parameters:
media - The media name.
port - The port number.
nport - The number of ports used.
transport - The name of the transport used.
formats - List of formats used.
Returns:
A SapMedia instance.
 o removeMedia
 public void removeMedia(SapMedia m)
Remove that media from the session.

Parameters:
m - The SapMedia to remove from the session description.
 o addAttribute
 public void addAttribute(String key,
                          String val)
Add an attribute to that media description.

Parameters:
key - The name of the attribute.
val - The value for that attribute.
 o removeAttribute
 public void removeAttribute(String key)
Remove an attribute definition. Removes all values for that attribute.

Parameters:
key - The attribute name.
 o getAttributeValue
 public String getAttributeValue(String key)
Get the first value of an attribute.

Parameters:
key - The attribute name.
Returns:
A String instance, or null.
 o getAttributeValues
 public String[] getAttributeValues(String key)
Get all mappings of an attribute.

Parameters:
key - The name of the attribute.
Returns:
A String array, which might have a zero length (to indicate a flag), or null.
 o addPhone
 public void addPhone(String phone)
Add a phone location.

Parameters:
phone - The new phone location.
 o addMail
 public void addMail(String email)
Add an email location.

Parameters:
email - The new email location.
 o addInfo
 public void addInfo(String info)
Add more info.

Parameters:
info - The info to be added.
 o addURL
 public void addURL(String url)
Add an URL for the session.

Parameters:
url - The URL.
 o setConnectionData
 public void setConnectionData(String ctype,
                               String atype,
                               InetAddress addr,
                               int ttl,
                               int naddr)
Set this session's connection data.

Parameters:
ctype - The connection network type.
atype - The address type.
addr - The address for the session itself.
ttl - The TTL for the session.
naddr - Number of following reserved address.
 o getTimeToLive
 public int getTimeToLive()
Get the max TTL for that session.

Returns:
A integer ttl value.
 o getOwner
 public byte[] getOwner()
Get the ownership field, formatted for SDP.

Returns:
A byte array containing only the owner info (used for session deletion announcements).
 o isDeleted
 public boolean isDeleted()
Has this session been deleted ?

Returns:
A boolean, true if a deletion message has been received or emitted concerning that session.
 o setTimes
 public void setTimes(long start,
                      long stop)
Set start and stop time for the session.

Parameters:
start - The start time, in milliseconds (Java format).
stop - The stop time, in milliseconds (Java format).

All Packages  Class Hierarchy  This Package  Previous  Next  Index