Top Description Fields Constructors Methods
javax.ws.rs

public Class RedirectionException

extends WebApplicationException
Class Inheritance
Imports
java.net.URI, javax.ws.rs.core.Response

A runtime application exception indicating a request redirection (HTTP 3xx status codes).
Author
Marek Potociar
Since
2.0

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
RedirectionException(Response.Status
redirection status. Must be a 3xx redirection code.
status
,
URI
redirection URI placed into the response Location header.
location
)

Construct a new redirection exception.

public
RedirectionException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
Response.Status
redirection status. Must be a 3xx redirection code.
status
,
URI
redirection URI placed into the response Location header.
location
)

Construct a new redirection exception.

public
RedirectionException(int
redirection status. Must be a 3xx redirection code.
status
,
URI
redirection URI placed into the response Location header.
location
)

Construct a new redirection exception.

public
RedirectionException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
int
redirection status. Must be a 3xx redirection code.
status
,
URI
redirection URI placed into the response Location header.
location
)

Construct a new redirection exception.

public
RedirectionException(Response
redirection response. Must have a status code set to a 3xx redirection code.
response
)

Construct a new redirection exception.

public
RedirectionException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
Response
redirection response. Must have a status code set to a 3xx redirection code.
response
)

Construct a new redirection exception.

Method Summary

Modifier and TypeMethod and Description
public URI

Returns:

redirection response location.
getLocation
()

Get the redirection response location.

Inherited from javax.ws.rs.WebApplicationException:
getResponsevalidatevalidate

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.ws.rs.WebApplicationException.serialVersionUID.

Constructor Detail

RedirectionExceptionback to summary
public RedirectionException(Response.Status status, URI location)

Construct a new redirection exception.

Parameters
status:Response.Status

redirection status. Must be a 3xx redirection code.

location:URI

redirection URI placed into the response Location header.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from javax.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(String message, Response.Status status, URI location)

Construct a new redirection exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:Response.Status

redirection status. Must be a 3xx redirection code.

location:URI

redirection URI placed into the response Location header.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from javax.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(int status, URI location)

Construct a new redirection exception.

Parameters
status:int

redirection status. Must be a 3xx redirection code.

location:URI

redirection URI placed into the response Location header.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the javax.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(String message, int status, URI location)

Construct a new redirection exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:int

redirection status. Must be a 3xx redirection code.

location:URI

redirection URI placed into the response Location header.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the javax.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(Response response)

Construct a new redirection exception.

Parameters
response:Response

redirection response. Must have a status code set to a 3xx redirection code.

Exceptions
IllegalArgumentException:
in case the response status code is not from the javax.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(String message, Response response)

Construct a new redirection exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

response:Response

redirection response. Must have a status code set to a 3xx redirection code.

Exceptions
IllegalArgumentException:
in case the response status code is not from the javax.ws.rs.core.Response.Status.Family#REDIRECTION status code family.

Method Detail

getLocationback to summary
public URI getLocation()

Get the redirection response location.

Returns:URI

redirection response location.