| javax.sip.header.CSeqHeader
CSeqHeader | public interface CSeqHeader extends Header(Code) | | 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.
- Method - The method part of CSeq is case-sensitive and MUST match that
of the request.
- Sequence number - The sequence number is chosen by the requesting
client and is unique within a single value of Call-ID. The sequence number
MUST be expressible as a 32-bit unsigned integer and MUST be less than
2**31. For non-REGISTER requests outside of a dialog, the sequence number
value is arbitrary. Consecutive Requests that differ in method, headers or
body, but have the same CallIdHeader must contain strictly monotonically
increasing and contiguous sequence numbers; sequence numbers do not wrap
around. Retransmissions of the same Request carry the same sequence number,
but an INVITE Request with a different message body or different headers
(a "re-invitation") acquires a new, higher sequence number. A server must
echo the CSeqHeader from the Request in its Response. If the method value is
missing in the received CSeqHeader, the server fills it in appropriately.
ACK and CANCEL Requests must contain the same CSeqHeader sequence number
(but not method) as the INVITE Request they refer to, while a BYE Request
cancelling an invitation must have a higher sequence number. An user agent
server must remember the highest sequence number for any INVITE Request
with the same CallIdHeader. The server must respond to, and then discard,
any INVITE Request with a lower sequence number.
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 version: 1.2 |
NAME | final public static String NAME(Code) | | Name of the CSeqHeader
|
equals | public boolean equals(Object obj)(Code) | | 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.
Parameters: obj - the object to compare this CSeqHeader with. true if obj is an instance of this classrepresenting the same CseqHeader as this, false otherwise. since: v1.2 |
getMethod | public String getMethod()(Code) | | Gets the method of CSeqHeader
method of CSeqHeader |
getSeqNumber | public long getSeqNumber()(Code) | | Gets the sequence number of this CSeqHeader.
sequence number of the CSeqHeader since: v1.2 |
getSequenceNumber | public int getSequenceNumber()(Code) | | Gets the sequence number of this CSeqHeader.
CSeqHeader.getSeqNumber() sequence number of the CSeqHeader since: v1.1 |
setMethod | public void setMethod(String method) throws ParseException(Code) | | Sets the method of CSeqHeader
Parameters: method - - the method of the Request of this CSeqHeader throws: ParseException - which signals that an error has been reachedunexpectedly while parsing the method value. |
setSeqNumber | public void setSeqNumber(long sequenceNumber) throws InvalidArgumentException(Code) | | 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 |
setSequenceNumber | public void setSequenceNumber(int sequenceNumber) throws InvalidArgumentException(Code) | | 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.1CSeqHeader.setSeqNumber(long) |
|
|