Class RedirectException

  • All Implemented Interfaces:
    java.io.Serializable

    public class RedirectException
    extends java.lang.Exception
    This Exception is used only if ClientProperties.FOLLOW_REDIRECTS is set to true.

    This exception is thrown when any of the Redirect HTTP response status codes (301, 302, 303, 307, 308) is received and:

    • the chained redirection count exceeds the value of org.glassfish.jersey.client.JdkConnectorProvider#MAX_REDIRECTS
    • or an infinite redirection loop is detected
    • or Location response header is missing, empty or does not contain a valid URI.
    See Also:
    RedirectHandler, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      RedirectException​(java.lang.String message)
      Constructor.
      RedirectException​(java.lang.String message, java.lang.Throwable t)
      Constructor.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RedirectException

        public RedirectException​(java.lang.String message)
        Constructor.
        Parameters:
        message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.
      • RedirectException

        public RedirectException​(java.lang.String message,
                                 java.lang.Throwable t)
        Constructor.
        Parameters:
        message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.