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
public class RestResponseException extends RuntimeException
An exception representing non-critical HTTP processing errors which will be translated intoRestResponse
and sent back to the client.RestRequestHandler
andRestRequestHandler
are responsible for catching subtypes of this exception and translate them into proper Netty responses.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RestResponseException(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
.RestResponseException(Throwable t)
Creates a newRestResponseException
whose status is 500.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.handler.codec.http.HttpResponseStatus
getStatus()
String
getText()
-
-
-
Constructor Detail
-
RestResponseException
public RestResponseException(io.netty.handler.codec.http.HttpResponseStatus status, String text)
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
public RestResponseException(Throwable t)
Creates a newRestResponseException
whose status is 500.- Parameters:
t
- Throwable instance.
-
RestResponseException
public RestResponseException(io.netty.handler.codec.http.HttpResponseStatus status, Throwable t)
Creates a newRestResponseException
.- Parameters:
status
- Status code returned to the client.t
- Throwable instance.
-
-
Method Detail
-
getStatus
public io.netty.handler.codec.http.HttpResponseStatus getStatus()
-
getText
public String getText()
-
-