Package org.xnio.http

Class RedirectException

All Implemented Interfaces:
Serializable

public class RedirectException extends IOException
An extension of IOException used to convey that a connection has failed as a redirect has been encountered.
Author:
Darran Lofthouse
See Also:
  • Constructor Details

    • RedirectException

      public RedirectException(int statusCode, String location)
      Constructs a new RedirectException instance. The message is left blank (null), and no cause is specified.
      Parameters:
      statusCode - the status code
      location - the redirection location, if any
    • RedirectException

      public RedirectException(String msg, int statusCode, String location)
      Constructs a new RedirectException instance with an initial message. No cause is specified.
      Parameters:
      msg - the message
      statusCode - the status code
      location - the redirection location, if any
    • RedirectException

      public RedirectException(Throwable cause, int statusCode, String location)
      Constructs a new RedirectException instance with an initial cause. If a non-null cause is specified, its message is used to initialize the message of this RedirectException; otherwise the message is left blank (null).
      Parameters:
      cause - the cause
      statusCode - the status code
      location - the redirection location, if any
    • RedirectException

      public RedirectException(String msg, Throwable cause, int statusCode, String location)
      Constructs a new RedirectException instance with an initial message and cause.
      Parameters:
      msg - the message
      cause - the cause
      statusCode - the status code
      location - the redirection location, if any
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Get the HTTP status code. This is the reason for the redirect.
      Returns:
      the status code
    • getLocation

      public String getLocation()
      Get the redirection target location.
      Returns:
      the redirection target location