- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.xnio.http.RedirectException
-
- All Implemented Interfaces:
java.io.Serializable
public class RedirectException extends java.io.IOException
An extension ofIOException
used to convey that a connection has failed as a redirect has been encountered.- Author:
- Darran Lofthouse
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RedirectException(int statusCode, java.lang.String location)
Constructs a newRedirectException
instance.RedirectException(java.lang.String msg, int statusCode, java.lang.String location)
Constructs a newRedirectException
instance with an initial message.RedirectException(java.lang.String msg, java.lang.Throwable cause, int statusCode, java.lang.String location)
Constructs a newRedirectException
instance with an initial message and cause.RedirectException(java.lang.Throwable cause, int statusCode, java.lang.String location)
Constructs a newRedirectException
instance with an initial cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLocation()
Get the redirection target location.int
getStatusCode()
Get the HTTP status code.
-
-
-
Constructor Detail
-
RedirectException
public RedirectException(int statusCode, java.lang.String location)
Constructs a newRedirectException
instance. The message is left blank (null
), and no cause is specified.- Parameters:
statusCode
- the status codelocation
- the redirection location, if any
-
RedirectException
public RedirectException(java.lang.String msg, int statusCode, java.lang.String location)
Constructs a newRedirectException
instance with an initial message. No cause is specified.- Parameters:
msg
- the messagestatusCode
- the status codelocation
- the redirection location, if any
-
RedirectException
public RedirectException(java.lang.Throwable cause, int statusCode, java.lang.String location)
Constructs a newRedirectException
instance with an initial cause. If a non-null
cause is specified, its message is used to initialize the message of thisRedirectException
; otherwise the message is left blank (null
).- Parameters:
cause
- the causestatusCode
- the status codelocation
- the redirection location, if any
-
RedirectException
public RedirectException(java.lang.String msg, java.lang.Throwable cause, int statusCode, java.lang.String location)
Constructs a newRedirectException
instance with an initial message and cause.- Parameters:
msg
- the messagecause
- the causestatusCode
- the status codelocation
- the redirection location, if any
-
-