Top Description Fields Constructors Methods
org.xnio.http

public Class RedirectException

extends IOException
Class Inheritance
Imports
java.io.IOException

An extension of IOException used to convey that a connection has failed as a redirect has been encountered.
Author
Darran Lofthouse

Field Summary

Modifier and TypeField and Description
private final String
private final int

Constructor Summary

AccessConstructor and Description
public
RedirectException(final int
the status code
statusCode
,
final String
the redirection location, if any
location
)

Constructs a new RedirectException instance.

public
RedirectException(final String
the message
msg
,
final int
the status code
statusCode
,
final String
the redirection location, if any
location
)

Constructs a new RedirectException instance with an initial message.

public
RedirectException(final Throwable
the cause
cause
,
final int
the status code
statusCode
,
final String
the redirection location, if any
location
)

Constructs a new RedirectException instance with an initial cause.

public
RedirectException(final String
the message
msg
,
final Throwable
the cause
cause
,
final int
the status code
statusCode
,
final String
the redirection location, if any
location
)

Constructs a new RedirectException instance with an initial message and cause.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the redirection target location
getLocation
()

Get the redirection target location.

public int

Returns:

the status code
getStatusCode
()

Get the HTTP status code.

Field Detail

locationback to summary
private final String location
statusCodeback to summary
private final int statusCode

Constructor Detail

RedirectExceptionback to summary
public RedirectException(final int statusCode, final String location)

Constructs a new RedirectException instance. The message is left blank (null), and no cause is specified.

Parameters
statusCode:int

the status code

location:String

the redirection location, if any

RedirectExceptionback to summary
public RedirectException(final String msg, final int statusCode, final String location)

Constructs a new RedirectException instance with an initial message. No cause is specified.

Parameters
msg:String

the message

statusCode:int

the status code

location:String

the redirection location, if any

RedirectExceptionback to summary
public RedirectException(final Throwable cause, final int statusCode, final 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:Throwable

the cause

statusCode:int

the status code

location:String

the redirection location, if any

RedirectExceptionback to summary
public RedirectException(final String msg, final Throwable cause, final int statusCode, final String location)

Constructs a new RedirectException instance with an initial message and cause.

Parameters
msg:String

the message

cause:Throwable

the cause

statusCode:int

the status code

location:String

the redirection location, if any

Method Detail

getLocationback to summary
public String getLocation()

Get the redirection target location.

Returns:String

the redirection target location

getStatusCodeback to summary
public int getStatusCode()

Get the HTTP status code. This is the reason for the redirect.

Returns:int

the status code