NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sdp.fields
Class OriginField

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sdp.fields.SDPObject
          extended by gov.nist.javax.sdp.fields.SDPField
              extended by gov.nist.javax.sdp.fields.OriginField
All Implemented Interfaces:
SDPFieldNames, Serializable, Cloneable, Field, Origin

public class OriginField
extends SDPField
implements Origin

Origin Field SDP header

Version:
JSR141-PUBLIC-REVIEW (subject to change).
Author:
Olivier Deruelle , M. Ranganathan
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface gov.nist.javax.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.
 gov.nist.core.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.
 String getSessIdAsString()
           
 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 getSessVersionAsString()
           
 String getUsername()
          Returns the name of the session originator.
 void setAddress(gov.nist.core.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 setSessionId(String sessId)
          This is a work around for some implementations that do not set a long session id.
 void setSessionVersion(long version)
          Sets the unique version of the session.
 void setSessVersion(long s)
          Set the sessVersion member
 void setSessVersion(String s)
          Set the session version as a string.
 void setUsername(String user)
          Sets the name of the session originator.
 
Methods inherited from class gov.nist.javax.sdp.fields.SDPField
getFieldName, getTypeChar, toString
 
Methods inherited from class gov.nist.javax.sdp.fields.SDPObject
dbgPrint, debugDump, equals, match
 
Methods inherited from class gov.nist.core.GenericObject
debugDump, encode, getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.sdp.Field
getTypeChar
 

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.


getSessIdAsString

public String getSessIdAsString()

getSessVersion

public long getSessVersion()
Get the sessionVersion member.


getSessVersionAsString

public String getSessVersionAsString()

getNettype

public String getNettype()
Get the netType member.


getAddrtype

public String getAddrtype()
Get the address type member.


getHost

public gov.nist.core.Host getHost()
Get the host member.


setSessId

public void setSessId(long s)
Set the sessId member


setSessionId

public void setSessionId(String sessId)
This is a work around for some implementations that do not set a long session id.


setSessVersion

public void setSessVersion(long s)
Set the sessVersion member


setSessVersion

public void setSessVersion(String s)
Set the session version as a string.


setNettype

public void setNettype(String n)
Set the nettype member


setAddrtype

public void setAddrtype(String a)
Set the addrtype member


setAddress

public void setAddress(gov.nist.core.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: gov.nist.core.GenericObject
Clones this object.

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

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.