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

gov.nist.javax.sip.header
Class RequestLine

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sip.header.SIPObject
          extended by gov.nist.javax.sip.header.RequestLine
All Implemented Interfaces:
Serializable, Cloneable

public class RequestLine
extends SIPObject

RequestLine of SIP Request.

Version:
1.2 $Revision: 1.7 $ $Date: 2009/07/17 18:57:36 $
Author:
M. Ranganathan
See Also:
Serialized Form

Constructor Summary
RequestLine()
          Default constructor
RequestLine(GenericURI requestURI, String method)
          Constructor given the request URI and the method.
 
Method Summary
 Object clone()
          Clones this object.
 String encode()
          Encode the request line as a String.
 StringBuffer encode(StringBuffer buffer)
          Encode the header into the given StringBuffer.
 boolean equals(Object other)
          Compare for equality.
 String getMethod()
          Get the Method
 String getSipVersion()
          Get the SIP version.
 GenericURI getUri()
          get the Request-URI.
 String getVersionMajor()
          Get the major verrsion number.
 String getVersionMinor()
          Get the minor version number.
 void setMethod(String method)
          Set the method member
 void setSipVersion(String s)
          Set the sipVersion member
 void setSIPVersion(String sipVersion)
          Set the SIP version.
 void setUri(GenericURI uri)
          Set the uri member.
 
Methods inherited from class gov.nist.javax.sip.header.SIPObject
dbgPrint, debugDump, debugDump, match, toString
 
Methods inherited from class gov.nist.core.GenericObject
getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestLine

public RequestLine()
Default constructor


RequestLine

public RequestLine(GenericURI requestURI,
                   String method)
Constructor given the request URI and the method.

Method Detail

setSIPVersion

public void setSIPVersion(String sipVersion)
Set the SIP version.

Parameters:
sipVersion - -- the SIP version to set.

encode

public String encode()
Encode the request line as a String.

Specified by:
encode in class SIPObject
Returns:
requestLine encoded as a string.

encode

public StringBuffer encode(StringBuffer buffer)
Description copied from class: SIPObject
Encode the header into the given StringBuffer. Default implemation calls encode().

Overrides:
encode in class SIPObject

getUri

public GenericURI getUri()
get the Request-URI.

Returns:
the request URI

getMethod

public String getMethod()
Get the Method

Returns:
method string.

getSipVersion

public String getSipVersion()
Get the SIP version.

Returns:
String

setUri

public void setUri(GenericURI uri)
Set the uri member.

Parameters:
uri - URI to set.

setMethod

public void setMethod(String method)
Set the method member

Parameters:
method - String to set

setSipVersion

public void setSipVersion(String s)
Set the sipVersion member

Parameters:
s - String to set

getVersionMajor

public String getVersionMajor()
Get the major verrsion number.

Returns:
String major version number

getVersionMinor

public String getVersionMinor()
Get the minor version number.

Returns:
String minor version number

equals

public boolean equals(Object other)
Compare for equality.

Overrides:
equals in class SIPObject
Parameters:
other - object to compare with. We assume that all fields are set.
Returns:
true if the objects are euqal and false otherwise

clone

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

Overrides:
clone in class gov.nist.core.GenericObject

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.