Top Description Fields Constructors
jakarta.ws.rs

public Class NotAcceptableException

extends ClientErrorException
Class Inheritance
Imports
jakarta.ws.rs.core.Response

A runtime exception indicating that a client request is not acceptable by the server.
Authors
Sergey Beryozkin, Marek Potociar
Since
2.0

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
NotAcceptableException()

Construct a new "request not acceptable" exception.

public
NotAcceptableException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
)

Construct a new "request not acceptable" exception.

public
NotAcceptableException(final Response
error response.
response
)

Construct a new "request not acceptable" exception.

public
NotAcceptableException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final Response
error response.
response
)

Construct a new "request not acceptable" exception.

public
NotAcceptableException(final Throwable
the underlying cause of the exception.
cause
)

Construct a new "request not acceptable" exception.

public
NotAcceptableException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new "request not acceptable" exception.

public
NotAcceptableException(final Response
error response.
response
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new "request not acceptable" exception.

public
NotAcceptableException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final Response
error response.
response
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new "request not acceptable" exception.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.ws.rs.ClientErrorException.serialVersionUID.

Constructor Detail

NotAcceptableExceptionback to summary
public NotAcceptableException()

Construct a new "request not acceptable" exception.

NotAcceptableExceptionback to summary
public NotAcceptableException(final String message)

Construct a new "request not acceptable" exception.

Parameters
message:String

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

NotAcceptableExceptionback to summary
public NotAcceptableException(final Response response)

Construct a new "request not acceptable" exception.

Parameters
response:Response

error response.

Exceptions
IllegalArgumentException:
in case the status code set in the response is not HTTP 406.
NotAcceptableExceptionback to summary
public NotAcceptableException(final String message, final Response response)

Construct a new "request not acceptable" exception.

Parameters
message:String

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

response:Response

error response.

Exceptions
IllegalArgumentException:
in case the status code set in the response is not HTTP 406.
NotAcceptableExceptionback to summary
public NotAcceptableException(final Throwable cause)

Construct a new "request not acceptable" exception.

Parameters
cause:Throwable

the underlying cause of the exception.

NotAcceptableExceptionback to summary
public NotAcceptableException(final String message, final Throwable cause)

Construct a new "request not acceptable" exception.

Parameters
message:String

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

cause:Throwable

the underlying cause of the exception.

NotAcceptableExceptionback to summary
public NotAcceptableException(final Response response, final Throwable cause)

Construct a new "request not acceptable" exception.

Parameters
response:Response

error response.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code set in the response is not HTTP 406.
NotAcceptableExceptionback to summary
public NotAcceptableException(final String message, final Response response, final Throwable cause)

Construct a new "request not acceptable" exception.

Parameters
message:String

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

response:Response

error response.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code set in the response is not HTTP 406.