public interface MaxForwardsHeader extends Header
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
Modifier and Type | Field and Description |
---|---|
static String |
NAME
Name of MaxForwardsHeader
|
Modifier and Type | Method and Description |
---|---|
void |
decrementMaxForwards()
This convenience function decrements the number of max-forwards by one.
|
boolean |
equals(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.
|
static final String NAME
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-forwardsInvalidArgumentException
- if the maxForwards argument is less
than 0 or greater than 255.Copyright © 2016. All Rights Reserved.