Class TooManyRedirectsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.dmfs.httpessentials.exceptions.ProtocolException
org.dmfs.httpessentials.exceptions.UnexpectedStatusException
org.dmfs.httpessentials.exceptions.RedirectionException
org.dmfs.httpessentials.exceptions.TooManyRedirectsException
- All Implemented Interfaces:
Serializable
An
Exception that's thrown when the client has been redirected too often.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTooManyRedirectsException(HttpStatus statusCode, int count, URI redirectingLocation, URI newLocation) Create a newTooManyRedirectsExceptionfor the given status, source and destination. -
Method Summary
Modifier and TypeMethodDescriptionintcount()Get the number of redirects that has led to this exception.Methods inherited from class org.dmfs.httpessentials.exceptions.RedirectionException
newLocation, redirectingLocationMethods inherited from class org.dmfs.httpessentials.exceptions.UnexpectedStatusException
statusMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TooManyRedirectsException
public TooManyRedirectsException(HttpStatus statusCode, int count, URI redirectingLocation, URI newLocation) Create a newTooManyRedirectsExceptionfor the given status, source and destination.- Parameters:
statusCode- TheHttpStatusof the last redirect.count- The number of redirects to this point.redirectingLocation- The source of the redirect.newLocation- The destination of the redirect.
-
-
Method Details
-
count
public int count()Get the number of redirects that has led to this exception.- Returns:
- The number of redirects.
-