|
JSIP API v1.2 November 2006 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MaxForwardsHeader
The Max-Forwards header field must be used with any SIP method to limit the number of proxies or gateways that can forward the request to the next downstream server. This can also be useful when the client is attempting to trace a request chain that appears to be failing or looping in mid-chain.
The Max-Forwards value is an integer in the range 0-255 indicating the remaining number of times this request message is allowed to be forwarded. This count is decremented by each server that forwards the request. The recommended initial value is 70.
This header field should be inserted by elements that can not otherwise guarantee loop detection. For example, a B2BUA should insert a Max-Forwards header field.
For Example:
Max-Forwards: 6
Field Summary | |
---|---|
static java.lang.String |
NAME
Name of MaxForwardsHeader |
Method Summary | |
---|---|
void |
decrementMaxForwards()
This convenience function decrements the number of max-forwards by one. |
boolean |
equals(java.lang.Object obj)
Compare this MaxForwardsHeader for equality with another. |
int |
getMaxForwards()
Gets the maximum number of forwards value of this MaxForwardsHeader. |
void |
setMaxForwards(int maxForwards)
Sets the max-forwards argument of this MaxForwardsHeader to the supplied maxForwards value. |
Methods inherited from interface javax.sip.header.Header |
---|
clone, getName, hashCode, toString |
Field Detail |
---|
static final java.lang.String NAME
Method Detail |
---|
void decrementMaxForwards() throws TooManyHopsException
TooManyHopsException
- if implementation cannot decrement
max-fowards i.e. max-forwards has reached zeroint getMaxForwards()
void setMaxForwards(int maxForwards) throws InvalidArgumentException
maxForwards
- - the number of max-forwards
InvalidArgumentException
- if the maxForwards argument is less
than 0 or greater than 255.boolean equals(java.lang.Object obj)
equals
in interface Header
equals
in class java.lang.Object
obj
- the object to compare this MaxForwardsHeader with.
true
if obj
is an instance of this class
representing the same MaxForwardsHeader as this, false
otherwise.
|
JSIP API v1.2 November 2006 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |