net.sourceforge.jsdp
Class SessionName

java.lang.Object
  extended by net.sourceforge.jsdp.SessionName
All Implemented Interfaces:
Serializable, Cloneable, Field

public class SessionName
extends Object
implements Field

A SessionName represents a s=<field value> field contained in a SDP message. This field identifies the name of the session.

Since:
0.1.0
Version:
1.0
Author:
Claudio Di Vita
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface net.sourceforge.jsdp.Field
ATTRIBUTE_FIELD, BANDWITH_FIELD, CONNECTION_FIELD, EMAIL_FIELD, END_OF_FIELD, INFORMATION_FIELD, KEY_FIELD, MEDIA_FIELD, ORIGIN_FIELD, PHONE_FIELD, REPEAT_TIME_FIELD, SESSION_NAME_FIELD, TIME_FIELD, TIMEZONE_FIELD, URI_FIELD, VERSION_FIELD
 
Constructor Summary
SessionName()
          Creates a new SessionName.
SessionName(String value)
          Creates a new SessionName.
 
Method Summary
 Object clone()
          Returns a clone of this field.
 char getType()
          Returns the type character for the field.
 String getValue()
          Returns the session name.
static SessionName parse(String field)
          Parse an input string and constructs the equivalent session name field.
 void setValue(String value)
          Sets the session name.
 String toString()
          Returns a string representation of the field.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionName

public SessionName()
Creates a new SessionName. The name value is set to -.


SessionName

public SessionName(String value)
            throws SDPException
Creates a new SessionName.

Parameters:
value - the name of the session
Throws:
SDPException - if the characters of the session name are not allowed
Method Detail

parse

public static SessionName parse(String field)
                         throws SDPParseException
Parse an input string and constructs the equivalent session name field.

Parameters:
field - the string to parse
Returns:
a new SessionName instance
Throws:
SDPParseException - if an error occurs while parsing

clone

public Object clone()
Returns a clone of this field.

Specified by:
clone in interface Field
Overrides:
clone in class Object
Returns:
a clone of this field

getType

public char getType()
Returns the type character for the field.

Specified by:
getType in interface Field
Returns:
the field type character: s

getValue

public String getValue()
Returns the session name.

Returns:
the session name

setValue

public void setValue(String value)
              throws SDPException
Sets the session name.

Parameters:
value - the session name
Throws:
SDPException - if the characters of the session name are not allowed

toString

public String toString()
Returns a string representation of the field. The representation has the form: s=<name>.

Specified by:
toString in interface Field
Overrides:
toString in class Object
Returns:
the string representation of the field


Copyright © 2004-2008. All Rights Reserved.