Version

TooManyHopsException – Routing Exception

The TooManyHopsException class is a specific type of ServletException that occurs when a SIP servlet application attempts to create a Proxy object for a request with a Max-Forwards header set to 0. This exception signals that the request cannot be forwarded due to exceeding the allowable number of hops, as defined by the Max-Forwards header.
If the application does not handle this exception, the SIP servlet container automatically intercepts it and generates a 483 (Too Many Hops) response to indicate the error to the sender.

Constructors:

TooManyHopsException()

public TooManyHopsException()

This default constructor creates a new instance of the TooManyHopsException without providing a specific error message. It is useful when no additional details about the exception are required.

TooManyHopsException

public TooManyHopsException(java.lang.String msg)

This constructor creates a new instance of the TooManyHopsException with a specified error message, providing additional context about the exception. This message can be retrieved later using the getMessage() method.
Parameters:
msg – A String containing the text of the exception message.

TooManyHopsException

public TooManyHopsException(java.lang.String message,
                            java.lang.Throwable cause)

This constructor creates a new instance of the TooManyHopsException with a specified detail message and a cause, which provides additional context about the exception. The detail message from the cause is not automatically appended to the exception’s message.
Parameters:
message – A String containing the detail message. This message is saved for later retrieval by the Throwable.getMessage() method.
cause – The underlying cause of the exception, saved for later retrieval by the Throwable.getCause() method. A null value indicates that the cause is nonexistent or unknown.

TooManyHopsException

public TooManyHopsException(java.lang.Throwable cause)

This constructor creates a new instance of the TooManyHopsException with a specified cause. The detail message for the exception is generated automatically based on the cause, typically including the class and detail message of the cause. Message is the result of calling cause.toString(). Useful for wrapping another exception while preserving its cause.
Parameters:
cause – The underlying reason for the exception, saved for later retrieval by the Throwable.getCause() method. A null value indicates that the cause is nonexistent or unknown.

Methods:

Methods inherited from class javax.servlet.ServletException:
getRootCause.

Methods inherited from class java.lang.Throwable:
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString.

Methods inherited from class java.lang.Object:
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait.

Start innovating with Mobius

What's next? Let's talk!

Mobius Software

As a company you'll get:

  • Get started quickly

  • Support any business model

  • Join millions of businesses

Questions? websupport@mobius.com