Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * SessionDescription.java
   *
   * Created on January 10, 2002, 2:38 PM
   */
  
  package javax.sdp;
  
  import java.io.*;
 import java.util.*;

A SessionDescription represents the data defined by the Session Description Protocol (see IETF RFC 2327) and holds information about the originitor 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. The SessionDescription also holds timing information for the session (e.g. start, end, repeat, time zone) and bandwidth supported for the session. Please refer to IETF RFC 2327 for a description of SDP.

Author(s):
deruelle
Version:
1.0
 
 public interface SessionDescription extends SerializableCloneable{

    
Public clone declaration.

Returns:
Object
Throws:
java.lang.CloneNotSupportedException if clone method is not supported
     
     public Object clone()
              throws CloneNotSupportedException;
    
    
Returns the version of SDP in use. This corresponds to the v= field of the SDP data.

Returns:
the integer version (-1 if not set).
     
     public Version getVersion();
    
    
Sets the version of SDP in use. This corresponds to the v= field of the SDP data.

Parameters:
v version - the integer version.
Throws:
SdpException if the version is null
     
     public void setVersion(Version v)
                 throws SdpException;
    
    
Returns information about the originator of the session. This corresponds to the o= field of the SDP data.

Returns:
the originator data.
     
     public Origin getOrigin();
    
    
Sets information about the originator of the session. This corresponds to the o= field of the SDP data.

Parameters:
origin origin - the originator data.
Throws:
SdpException if the origin is null
     
     public void setOrigin(Origin origin)
                throws SdpException;
    
    
Returns the name of the session. This corresponds to the s= field of the SDP data.

Returns:
the session name.
     
     public SessionName getSessionName();
    
    
    
Sets the name of the session. This corresponds to the s= field of the SDP data.

Parameters:
sessionName name - the session name.
Throws:
SdpException if the sessionName is null
     
     public void setSessionName(SessionName sessionName)
                     throws SdpException;
    
    
Returns value of the info field (i=) of this object.

Returns:
info
     
     public Info getInfo();
    
    
Sets the i= field of this object.

Parameters:
i s - new i= value; if null removes the field
Throws:
SdpException if the info is null
     
     public void setInfo(Info i)
              throws SdpException;
    
    
Returns a uri to the location of more details about the session. This corresponds to the u= field of the SDP data.

Returns:
the uri.
     
     public URI getURI();
    
    
Sets the uri to the location of more details about the session. This corresponds to the u= field of the SDP data.

Parameters:
uri uri - the uri.
Throws:
SdpException if the uri is null
    
    public void setURI(URI uri)
            throws SdpException;
    
    
Returns an email address to contact for further information about the session. This corresponds to the e= field of the SDP data.

Parameters:
create boolean to set
Returns:
the email address.
Throws:
SdpException
    
    public Vector getEmails(boolean create)
                 throws SdpParseException;
    
    
Sets a an email address to contact for further information about the session. This corresponds to the e= field of the SDP data.

Parameters:
emails email - the email address.
Throws:
SdpException if the vector is null
    
    public void setEmails(Vector emails)
               throws SdpException;
    
    
Returns a phone number to contact for further information about the session. This corresponds to the p= field of the SDP data.

Parameters:
create boolean to set
Returns:
the phone number.
Throws:
SdpException
    
    public Vector getPhones(boolean create)
                 throws SdpException;
    
    
Sets a phone number to contact for further information about the session. This corresponds to the p= field of the SDP data.

Parameters:
phones phone - the phone number.
Throws:
SdpException if the vector is null
    
    public void setPhones(Vector phones)
               throws SdpException;
    
    
Returns a TimeField indicating the start, stop, repetition and time zone information of the session. This corresponds to the t= field of the SDP data.

Parameters:
create boolean to set
Returns:
the Time Field.
Throws:
SdpException
    
    public Vector getTimeDescriptions(boolean create)
                           throws SdpException;
    
    
Sets a TimeField indicating the start, stop, repetition and time zone information of the session. This corresponds to the t= field of the SDP data.

Parameters:
times time - the TimeField.
Throws:
SdpException if the vector is null
    
    public void setTimeDescriptions(Vector times)
                         throws SdpException;
    
    
Returns the time zone adjustments for the Session

Parameters:
create boolean to set
Returns:
a Hashtable containing the zone adjustments, where the key is the Adjusted Time Zone and the value is the offset.
Throws:
SdpException
    
    public Vector getZoneAdjustments(boolean create)
                          throws SdpException;
    
    
Sets the time zone adjustment for the TimeField.

Parameters:
zoneAdjustments zoneAdjustments - a Hashtable containing the zone adjustments, where the key is the Adjusted Time Zone and the value is the offset.
Throws:
SdpException if the vector is null
    
    public void setZoneAdjustments(Vector zoneAdjustments)
                        throws SdpException;
    
    
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.

Returns:
connection
    
    public Connection getConnection();
    
    
Set the connection data for this entity.

Parameters:
conn to set
Throws:
SdpException if the parameter is null
    
    public void setConnection(Connection conn)
                   throws SdpException;
    
    
Returns the Bandwidth of the specified type.

Parameters:
create type - type of the Bandwidth to return
Returns:
the Bandwidth or null if undefined
    
    public Vector getBandwidths(boolean create);
    
    
set the value of the Bandwidth with the specified type.

Parameters:
bandwidths to set
Throws:
SdpException if the vector is null
    
    public void setBandwidths(Vector bandwidths)
                   throws SdpException;
    
    
Returns the integer value of the specified bandwidth name.

Parameters:
name name - the name of the bandwidth type
Returns:
the value of the named bandwidth
Throws:
SdpParseException
    
    public int getBandwidth(String name)
                 throws SdpParseException;
    
    
Sets the value of the specified bandwidth type.

Parameters:
name name - the name of the bandwidth type.
value value - the value of the named bandwidth type.
Throws:
SdpException if the name is null
    
    public void setBandwidth(String name,
                         int value)
                  throws SdpException;
    
    
Removes the specified bandwidth type.

Parameters:
name name - the name of the bandwidth type
    
    public void removeBandwidth(String name);
    
    
Returns the key data.

Returns:
key
    
    public Key getKey();
    
    
Sets encryption key information. This consists of a method and an encryption key included inline.

Parameters:
key key - the encryption key data; depending on method may be null
Throws:
SdpException if the parameter is null
    
    public void setKey(Key key)
            throws SdpException;
    
    
Returns the value of the specified attribute.

Parameters:
name name - the name of the attribute
Returns:
the value of the named attribute
Throws:
SdpParseException
    
    public String getAttribute(String name)
                    throws SdpParseException;
    
    
Returns the set of attributes for this Description as a Vector of Attribute objects in the order they were parsed.

Parameters:
create create - specifies whether to return null or a new empty Vector in case no attributes exists for this Description
Returns:
attributes for this Description
 
    public Vector getAttributes(boolean create);
    
    
Removes the attribute specified by the value parameter.

Parameters:
name name - the name of the attribute
    
    public void removeAttribute(String name);
    
    
Sets the value of the specified attribute.

Parameters:
name name - the name of the attribute.
value value - the value of the named attribute.
Throws:
SdpException if the name or the value is null
    
    public void setAttribute(String name,
                         String value)
                  throws SdpException;
    
    
Adds the specified Attribute to this Description object.

Parameters:
Attributes attribute - the attribute to add
Throws:
SdpException if the vector is null
    
    public void setAttributes(Vector Attributes)
                   throws SdpException;
    
    
Adds a MediaDescription to the session description. These correspond to the m= fields of the SDP data.

Parameters:
create boolean to set
Returns:
media - the field to add.
Throws:
SdpException
    
    public Vector getMediaDescriptions(boolean create)
                            throws SdpException;
    
    
Removes all MediaDescriptions from the session description.

Parameters:
mediaDescriptions to set
Throws:
SdpException if the parameter is null
    
    public void setMediaDescriptions(Vector mediaDescriptions)
                          throws SdpException;
New to GrepCode? Check out our FAQ X