|
||||||||||
| 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.RequestHeader
|
+--jain.protocol.ip.sip.header.MaxForwardsHeader
This class represents the Max-Forwards request-header. The MaxForwardsHeader may be used with any SIP method to limit the number of proxies or gateways that can forward the RequestMessage to the next downstream server. This can also be useful when the client is attempting to trace a request chain which appears to be failing or looping in mid-chain.
The MaxForwards value is an integer indicating the remaining number of times this RequestMessage is allowed to be forwarded. Each proxy or gateway recipient of a RequestMessage containing a MaxForwardsHeader must check and update its value prior to forwarding the request. If the received value is zero (0), the recipient must not forward the RequestMessage. Instead, for OptionsMessages and RegisterMessagess, it must respond as the final recipient. For all other methods, the server returns a TOO_MANY_HOPS ResponseMessage.
If the received MaxForwards value is greater than zero, then the forwarded RequestMessage must contain an updated MaxForwardsHeader with a value decremented by one (1).
| Field Summary | |
static java.lang.String |
token
Token of MaxForwardsHeader |
| Fields inherited from class jain.protocol.ip.sip.header.Header |
ENTITY_HEADER,
GENERAL_HEADER,
REQUEST_HEADER,
RESPONSE_HEADER |
| Constructor Summary | |
MaxForwardsHeader(int maxForwards)
Creates a MaxForwardsHeader based on given number of max-forwards |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of MaxForwardsHeader |
void |
decrementMaxForwards()
Decrements the number of max-forwards by one |
boolean |
equals(MaxForwardsHeader maxForwardsHeader)
Indicates whether some other MaxForwardsHeader is "equal to" this one |
int |
getMaxForwards()
Gets max-forwards of MaxForwardsHeader |
java.lang.String |
getValue()
Gets value of MaxForwardsHeader |
void |
setMaxForwards(int maxForwards)
Sets max-forwards of MaxForwardsHeader |
| 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 MaxForwardsHeader(int maxForwards)
maxForwards - number of max-forwards| Method Detail |
public void setMaxForwards(int maxForwards)
throws java.lang.IllegalArgumentException
maxForwards - number of max-forwardspublic void decrementMaxForwards()
public int getMaxForwards()
public java.lang.String getValue()
public java.lang.Object clone()
public boolean equals(MaxForwardsHeader maxForwardsHeader)
maxForwardsHeader - the MaxForwardsHeader with which to compare
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright - 2000 Sun Microsystems