JSIP API v1.2
November 2006

javax.sip.header
Interface CSeqHeader

All Superinterfaces:
java.lang.Cloneable, Header, java.io.Serializable

public interface CSeqHeader
extends Header

A CSeq header field in a request contains a single decimal sequence number and the request method. The CSeq header field serves to identify and order transactions within a dialog, to provide a means to uniquely identify transactions, and to differentiate between new requests and request retransmissions. Two CSeq header fields are considered equal if the sequence number and the request method are identical.

As long as a client follows the above guidelines, it may use any mechanism it would like to select CSeq header field values.

Forked Requests:
Forked Requests must have the same CSeqHeader as there would be ambiguity otherwise between these forked Requests and later BYE Requests issued by the client user agent.

For Example:
CSeq: 4711 INVITE

Author:
BEA Systems, NIST

Field Summary
static java.lang.String NAME
          Name of the CSeqHeader
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare this CSeqHeader for equality with another.
 java.lang.String getMethod()
          Gets the method of CSeqHeader
 long getSeqNumber()
          Gets the sequence number of this CSeqHeader.
 int getSequenceNumber()
          Deprecated. This method is replaced with getSeqNumber() with type long.
 void setMethod(java.lang.String method)
          Sets the method of CSeqHeader
 void setSeqNumber(long sequenceNumber)
          Sets the sequence number value of the CSeqHeader.
 void setSequenceNumber(int sequenceNumber)
          Deprecated. This method is replaced with setSeqNumber(long) with type long.
 
Methods inherited from interface javax.sip.header.Header
clone, getName, hashCode, toString
 

Field Detail

NAME

static final java.lang.String NAME
Name of the CSeqHeader

See Also:
Constant Field Values
Method Detail

setMethod

void setMethod(java.lang.String method)
               throws java.text.ParseException
Sets the method of CSeqHeader

Parameters:
method - - the method of the Request of this CSeqHeader
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the method value.

getMethod

java.lang.String getMethod()
Gets the method of CSeqHeader

Returns:
method of CSeqHeader

setSequenceNumber

void setSequenceNumber(int sequenceNumber)
                       throws InvalidArgumentException
Deprecated. This method is replaced with setSeqNumber(long) with type long.

Sets the sequence number value of the CSeqHeader. The sequence number MUST be expressible as a 32-bit unsigned integer and MUST be less than 2**32 -1

Parameters:
sequenceNumber - - the new sequence number of this CSeqHeader
Throws:
InvalidArgumentException - if supplied value is less than zero.
Since:
v1.1

getSequenceNumber

int getSequenceNumber()
Deprecated. This method is replaced with getSeqNumber() with type long.

Gets the sequence number of this CSeqHeader.

Returns:
sequence number of the CSeqHeader
Since:
v1.1

setSeqNumber

void setSeqNumber(long sequenceNumber)
                  throws InvalidArgumentException
Sets the sequence number value of the CSeqHeader.

Parameters:
sequenceNumber - - the new sequence number of this CSeqHeader
Throws:
InvalidArgumentException - if supplied value is less than zero.
Since:
v1.2

getSeqNumber

long getSeqNumber()
Gets the sequence number of this CSeqHeader.

Returns:
sequence number of the CSeqHeader
Since:
v1.2

equals

boolean equals(java.lang.Object obj)
Compare this CSeqHeader for equality with another. This method overrides the equals method in javax.sip.Header. This method specifies object equality as outlined by RFC3261. Two CSeq header fields are considered equal if the sequence number and the request method are identical. When comparing header fields, field names are always case-insensitive. Unless otherwise stated in the definition of a particular header field, field values, parameter names, and parameter values are case-insensitive. Tokens are always case-insensitive. Unless specified otherwise, values expressed as quoted strings are case-sensitive.

Specified by:
equals in interface Header
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this CSeqHeader with.
Returns:
true if obj is an instance of this class representing the same CseqHeader as this, false otherwise.
Since:
v1.2

JSIP API v1.2
November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems