org.lastbamboo.common.sdp.fields
Class OriginField

java.lang.Object
  extended by org.lastbamboo.common.sdp.GenericObject
      extended by org.lastbamboo.common.sdp.fields.SDPObject
          extended by org.lastbamboo.common.sdp.fields.SDPField
              extended by org.lastbamboo.common.sdp.fields.OriginField
All Implemented Interfaces:
Serializable, Cloneable, Field, Origin, SDPFieldNames

public class OriginField
extends SDPField
implements Origin

Origin Field SDP header

Version:
JSR141-PUBLIC-REVIEW (subject to change).
Author:
Olivier Deruelle , M. Ranganathan
This code is in the public domain.
See Also:
Serialized Form

Field Summary
protected  Host address
           
protected  String addrtype
           
protected  String nettype
           
protected  long sessId
           
protected  long sessVersion
           
protected  String username
           
 
Fields inherited from class org.lastbamboo.common.sdp.fields.SDPField
fieldName
 
Fields inherited from class org.lastbamboo.common.sdp.GenericObject
AND, AT, COLON, COMMA, DOT, DOUBLE_QUOTE, EQUALS, GREATER_THAN, HT, immutableClasses, immutableClassNames, indentation, LESS_THAN, LPAREN, matchExpression, NEWLINE, PERCENT, POUND, QUESTION, QUOTE, RETURN, RPAREN, SEMICOLON, SLASH, SP, STAR, stringRepresentation
 
Fields inherited from interface org.lastbamboo.common.sdp.fields.SDPFieldNames
ATTRIBUTE_FIELD, BANDWIDTH_FIELD, CONNECTION_FIELD, EMAIL_FIELD, INFORMATION_FIELD, KEY_FIELD, MEDIA_FIELD, ORIGIN_FIELD, PHONE_FIELD, PROTO_VERSION_FIELD, REPEAT_FIELD, SESSION_NAME_FIELD, TIME_FIELD, URI_FIELD, ZONE_FIELD
 
Constructor Summary
OriginField()
           
 
Method Summary
 Object clone()
          Clones this object.
 String encode()
          Get the string encoded version of this object
 String getAddress()
          Returns the type of the network for this Connection.
 String getAddressType()
          Returns the type of the address for this Connection.
 String getAddrtype()
          Get the address type member.
 Host getHost()
          Get the host member.
 String getNettype()
          Get the netType member.
 String getNetworkType()
          Returns the type of the network for this Connection
 long getSessId()
          Get the sessionID member.
 long getSessionId()
          Returns the unique identity of the session.
 long getSessionVersion()
          Returns the unique version of the session.
 long getSessVersion()
          Get the sessionVersion member.
 String getUsername()
          Returns the name of the session originator.
 void setAddress(Host a)
          Set the address member
 void setAddress(String addr)
          Sets the type of the address for this Connection.
 void setAddressType(String type)
          Returns the type of the network for this Connection.
 void setAddrtype(String a)
          Set the addrtype member
 void setNettype(String n)
          Set the nettype member
 void setNetworkType(String type)
          Sets the type of the network for this Connection.
 void setSessId(long s)
          Set the sessId member
 void setSessionId(long id)
          Sets the unique identity of the session.
 void setSessionVersion(long version)
          Sets the unique version of the session.
 void setSessVersion(long s)
          Set the sessVersion member
 void setUsername(String user)
          Sets the name of the session originator.
 
Methods inherited from class org.lastbamboo.common.sdp.fields.SDPField
getFieldName, getTypeChar, toString
 
Methods inherited from class org.lastbamboo.common.sdp.fields.SDPObject
dbgPrint, debugDump, equals, getStringRepresentation, initSprint, match, merge, replace, replace, replace, replace, sprint
 
Methods inherited from class org.lastbamboo.common.sdp.GenericObject
Assert, dbgPrint, dbgPrint, debugDump, getIndentation, getMatcher, isMySubclass, makeClone, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.lastbamboo.common.sdp.api.Field
getTypeChar
 

Field Detail

username

protected String username

sessId

protected long sessId

sessVersion

protected long sessVersion

nettype

protected String nettype

addrtype

protected String addrtype

address

protected Host address
Constructor Detail

OriginField

public OriginField()
Method Detail

getUsername

public String getUsername()
                   throws SdpParseException
Returns the name of the session originator.

Specified by:
getUsername in interface Origin
Returns:
the string username.
Throws:
SdpParseException

getSessId

public long getSessId()
Get the sessionID member.


getSessVersion

public long getSessVersion()
Get the sessionVersion member.


getNettype

public String getNettype()
Get the netType member.


getAddrtype

public String getAddrtype()
Get the address type member.


getHost

public Host getHost()
Get the host member.


setSessId

public void setSessId(long s)
Set the sessId member


setSessVersion

public void setSessVersion(long s)
Set the sessVersion member


setNettype

public void setNettype(String n)
Set the nettype member


setAddrtype

public void setAddrtype(String a)
Set the addrtype member


setAddress

public void setAddress(Host a)
Set the address member


setUsername

public void setUsername(String user)
                 throws SdpException
Sets the name of the session originator.

Specified by:
setUsername in interface Origin
Parameters:
user - the string username.
Throws:
SdpException - if the parameter is null

getSessionId

public long getSessionId()
                  throws SdpParseException
Returns the unique identity of the session.

Specified by:
getSessionId in interface Origin
Returns:
the session id.
Throws:
SdpParseException

setSessionId

public void setSessionId(long id)
                  throws SdpException
Sets the unique identity of the session.

Specified by:
setSessionId in interface Origin
Parameters:
id - the session id.
Throws:
SdpException - if the id is <0

getSessionVersion

public long getSessionVersion()
                       throws SdpParseException
Returns the unique version of the session.

Specified by:
getSessionVersion in interface Origin
Returns:
the session version.
Throws:
SdpException
SdpParseException

setSessionVersion

public void setSessionVersion(long version)
                       throws SdpException
Sets the unique version of the session.

Specified by:
setSessionVersion in interface Origin
Parameters:
version - the session version.
Throws:
SdpException - if the version is <0

getAddress

public String getAddress()
                  throws SdpParseException
Returns the type of the network for this Connection.

Specified by:
getAddress in interface Origin
Returns:
the string network type.
Throws:
SdpParseException

getAddressType

public String getAddressType()
                      throws SdpParseException
Returns the type of the address for this Connection.

Specified by:
getAddressType in interface Origin
Returns:
the string address type.
Throws:
SdpParseException

getNetworkType

public String getNetworkType()
                      throws SdpParseException
Returns the type of the network for this Connection

Specified by:
getNetworkType in interface Origin
Returns:
the string network type.
Throws:
SdpParseException

setAddress

public void setAddress(String addr)
                throws SdpException
Sets the type of the address for this Connection.

Specified by:
setAddress in interface Origin
Parameters:
addr - string address type.
Throws:
SdpException - if the addr is null

setAddressType

public void setAddressType(String type)
                    throws SdpException
Returns the type of the network for this Connection.

Specified by:
setAddressType in interface Origin
Parameters:
type - the string network type.
Throws:
SdpException - if the type is null

setNetworkType

public void setNetworkType(String type)
                    throws SdpException
Sets the type of the network for this Connection.

Specified by:
setNetworkType in interface Origin
Parameters:
type - the string network type.
Throws:
SdpException - if the type is null

encode

public String encode()
Get the string encoded version of this object

Specified by:
encode in class SDPField
Since:
v1.0

clone

public Object clone()
Description copied from class: GenericObject
Clones this object.

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


Copyright © 2013 LittleShoot. All Rights Reserved.