|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--jain.protocol.ip.sip.header.Header
|
+--jain.protocol.ip.sip.header.GeneralHeader
|
+--jain.protocol.ip.sip.header.CSeqHeader
This class represents the CSeq (command sequence) general-header. Clients must add the CSeqHeader to every RequestMessage. A CSeqHeader in a RequestMessage contains the RequestMessage method and a single decimal sequence number chosen by the requesting client, unique within a single value of Call-ID. The sequence number must be expressible as a 32-bit unsigned integer. The initial value of the sequence number is arbitrary, but must be less than 2**31. Consecutive RequestMessages 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 equence number, but an InviteMessage 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 RwquestMessage in its ResponseMessage. If the Method value is missing in the received CSeqHeader, the server fills it in appropriately.
AckMessages and CancelMessages must contain the same CSeqHeader sequence number (but not method) as the InviteMessages they refer to, while a ByeMessage cancelling an invitation must have a higher sequence number. A ByeMessage with a CSeqHeader sequence number that is not higher should cause a BAD_REQUEST ResponseMessage to be generated.
A user agent server must remember the highest sequence number for any InviteMessage with the same CallIdHeader. The server must respond to, and then discard, any InviteMessage with a lower sequence number.
All RequestMessages spawned in a parallel search have the same CSeqHeader as the RequestMessage triggering the parallel search.
The Method value allows the client to distinguish the response to an InviteMessage from that of a response to a CancelMessage. CancelMessages can be generated by proxies; if they were to increase the sequence number, it might conflict with a later RequestMessage issued by the user agent for the same call.
Forked RequestMessages must have the same CSeqHeader as there would be ambiguity otherwise between these forked RequestMessages and later ByeMessages issued by the client user agent.
| Field Summary | |
static java.lang.String |
token
Token of CSeqHeader |
| Fields inherited from class jain.protocol.ip.sip.header.Header |
ENTITY_HEADER,
GENERAL_HEADER,
REQUEST_HEADER,
RESPONSE_HEADER |
| Constructor Summary | |
CSeqHeader(int sequenceNumber,
java.lang.String method)
Creates a CSeqHeader based on given sequence number and method |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of CSeqHeader |
boolean |
equals(CSeqHeader cSeqHeader)
Indicates whether some other CSeqHeader is "equal to" this one |
java.lang.String |
getMethod()
Gets method of CSeqHeader |
int |
getSequenceNumber()
Gets sequence number of CSeqHeader |
java.lang.String |
getValue()
Gets value of CSeqHeader |
void |
setMethod(java.lang.String method)
Set method of CSeqHeader |
void |
setSequenceNumber(int sequenceNumber)
Set sequence number of CSeqHeader |
| Methods inherited from class jain.protocol.ip.sip.header.Header |
equals,
getHeaderType,
getToken,
setValue,
toString |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String token
| Constructor Detail |
public CSeqHeader(int sequenceNumber,
java.lang.String method)
throws java.lang.IllegalArgumentException
sequenceNumber - sequence numbermethod - method| Method Detail |
public void setSequenceNumber(int sequenceNumber)
throws java.lang.IllegalArgumentException
sequenceNumber - sequence number
public void setMethod(java.lang.String method)
throws java.lang.IllegalArgumentException
method - methodpublic int getSequenceNumber()
public java.lang.String getMethod()
public java.lang.String getValue()
public java.lang.Object clone()
public boolean equals(CSeqHeader cSeqHeader)
cSeqHeader - the CSeqHeader with which to compare
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright - 2000 Sun Microsystems