Package org.infinispan.rest
Class RestResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.infinispan.rest.RestResponseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidFlagException
,MalformedRequest
,NoCacheFoundException
,NoDataFoundException
,NoKeyException
,NotAllowedException
,ResourceNotFoundException
,ServiceUnavailableException
,UnacceptableDataFormatException
,WrongDateFormatException
An exception representing non-critical HTTP processing errors which will be translated
into
RestResponse
and sent back to the client.
RestRequestHandler
and RestRequestHandler
are responsible for catching subtypes of this
exception and translate them into proper Netty responses.
- See Also:
-
Constructor Summary
ConstructorDescriptionRestResponseException
(io.netty.handler.codec.http.HttpResponseStatus status, String text) Creates newRestResponseException
.RestResponseException
(io.netty.handler.codec.http.HttpResponseStatus status, String text, Throwable t) Creates a newRestResponseException
.RestResponseException
(io.netty.handler.codec.http.HttpResponseStatus status, Throwable t) Creates a newRestResponseException
.Creates a newRestResponseException
whose status is 500. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RestResponseException
Creates newRestResponseException
.- Parameters:
status
- Status code returned to the client.text
- Text returned to the client.
-
RestResponseException
public RestResponseException(io.netty.handler.codec.http.HttpResponseStatus status, String text, Throwable t) Creates a newRestResponseException
.- Parameters:
status
- Status code returned to the client.text
- Text returned to the client.t
- Throwable instance.
-
RestResponseException
Creates a newRestResponseException
whose status is 500.- Parameters:
t
- Throwable instance.
-
RestResponseException
Creates a newRestResponseException
.- Parameters:
status
- Status code returned to the client.t
- Throwable instance.
-
-
Method Details
-
getStatus
public io.netty.handler.codec.http.HttpResponseStatus getStatus() -
getText
-