Package com.linecorp.armeria.server
Class HttpResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.linecorp.armeria.server.HttpResponseException
- All Implemented Interfaces:
Serializable
public final class HttpResponseException extends RuntimeException
A
RuntimeException
that is raised to send an HTTP response with the content specified
by a user. This class holds an HttpResponse
which would be sent back to the client who
sent the corresponding request.- See Also:
HttpStatusException
, Serialized Form
-
Method Summary
Modifier and Type Method Description Throwable
fillInStackTrace()
HttpResponse
httpResponse()
Returns theHttpResponse
which would be sent back to the client who sent the corresponding request.static HttpResponseException
of(int statusCode)
Returns a newHttpResponseException
instance with the specified HTTP status code.static HttpResponseException
of(AggregatedHttpResponse aggregatedResponse)
Returns a newHttpResponseException
instance with the specifiedAggregatedHttpResponse
.static HttpResponseException
of(HttpResponse httpResponse)
Returns a newHttpResponseException
instance with the specifiedHttpResponse
.static HttpResponseException
of(HttpStatus httpStatus)
Returns a newHttpResponseException
instance with the specifiedHttpStatus
.Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
of
Returns a newHttpResponseException
instance with the specified HTTP status code. -
of
Returns a newHttpResponseException
instance with the specifiedHttpStatus
. -
of
Returns a newHttpResponseException
instance with the specifiedAggregatedHttpResponse
. -
of
Returns a newHttpResponseException
instance with the specifiedHttpResponse
. -
httpResponse
Returns theHttpResponse
which would be sent back to the client who sent the corresponding request. -
fillInStackTrace
- Overrides:
fillInStackTrace
in classThrowable
-