Top Description Fields Constructors Methods
jakarta.ws.rs

public Class RedirectionException

extends WebApplicationException
Class Inheritance
Imports
java.net.URI, jakarta.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(final Response.Status
redirection status. Must be a 3xx redirection code.
status
,
final URI
redirection URI placed into the response Location header.
location
)

Construct a new redirection exception.

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

Construct a new redirection exception.

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

Construct a new redirection exception.

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

Construct a new redirection exception.

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

Construct a new redirection exception.

public
RedirectionException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final 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 jakarta.ws.rs.WebApplicationException:
getResponsevalidatevalidate

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.ws.rs.WebApplicationException.serialVersionUID.

Constructor Detail

RedirectionExceptionback to summary
public RedirectionException(final Response.Status status, final 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 jakarta.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(final String message, final Response.Status status, final 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 jakarta.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(final int status, final 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 jakarta.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(final String message, final int status, final 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 jakarta.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(final 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 jakarta.ws.rs.core.Response.Status.Family#REDIRECTION status code family.
RedirectionExceptionback to summary
public RedirectionException(final String message, final 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 jakarta.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.