Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unpublished - rights reserved under the Copyright Laws of the United States. Copyright � 2003 Sun Microsystems, Inc. All rights reserved. Copyright � 2005 BEA Systems, Inc. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Module Name : JSIP Specification File Name : Author : Phelim O'Doherty HISTORY Version Date Author Comments 1.1 08/10/2002 Phelim O'Doherty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 package javax.sip.header;
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

BEA Systems, NIST
 public interface MaxForwardsHeader extends Header {

This convenience function decrements the number of max-forwards by one. This utility is useful for proxy functionality.

TooManyHopsException if implementation cannot decrement max-fowards i.e. max-forwards has reached zero
     public void decrementMaxForwards() throws TooManyHopsException;

Gets the maximum number of forwards value of this MaxForwardsHeader.

the maximum number of forwards of this MaxForwardsHeader
    public int getMaxForwards();

Sets the max-forwards argument of this MaxForwardsHeader to the supplied maxForwards value.

maxForwards - the number of max-forwards
javax.sip.InvalidArgumentException if the maxForwards argument is less than 0 or greater than 255.
    public void setMaxForwards(int maxForwardsthrows InvalidArgumentException;

Compare this MaxForwardsHeader for equality with another. This method overrides the equals method in javax.sip.Header. This method specifies object equality as outlined by RFC3261. Two MaxForwards header fields are equivalent if their max forwards integer match.

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.
    public boolean equals(Object obj);  

Name of MaxForwardsHeader
    public final static String NAME = "Max-Forwards";
New to GrepCode? Check out our FAQ X