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
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 TypeMethodDescriptionReturns theHttpResponse
which would be sent back to the client who sent the corresponding request.static HttpResponseException
of(int statusCode)
Deprecated.static HttpResponseException
of(AggregatedHttpResponse aggregatedResponse)
Returns a newHttpResponseException
instance with the specifiedAggregatedHttpResponse
.static HttpResponseException
of(AggregatedHttpResponse aggregatedResponse, @Nullable Throwable cause)
Returns a newHttpResponseException
instance with the specifiedAggregatedHttpResponse
andThrowable
.static HttpResponseException
of(HttpResponse httpResponse)
Returns a newHttpResponseException
instance with the specifiedHttpResponse
.static HttpResponseException
of(HttpResponse httpResponse, @Nullable Throwable cause)
static HttpResponseException
of(HttpStatus httpStatus)
Deprecated.UseHttpStatusException.of(HttpStatus)
instead.Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
of
Deprecated.UseHttpStatusException.of(int)
instead.Returns a newHttpResponseException
instance with the specified HTTP status code. -
of
Deprecated.UseHttpStatusException.of(HttpStatus)
instead.Returns a newHttpResponseException
instance with the specifiedHttpStatus
. -
of
Returns a newHttpResponseException
instance with the specifiedAggregatedHttpResponse
. -
of
public static HttpResponseException of(AggregatedHttpResponse aggregatedResponse, @Nullable @Nullable Throwable cause)Returns a newHttpResponseException
instance with the specifiedAggregatedHttpResponse
andThrowable
. -
of
Returns a newHttpResponseException
instance with the specifiedHttpResponse
. -
of
public static HttpResponseException of(HttpResponse httpResponse, @Nullable @Nullable Throwable cause) -
httpResponse
Returns theHttpResponse
which would be sent back to the client who sent the corresponding request. -
fillInStackTrace
- Overrides:
fillInStackTrace
in classThrowable
-
HttpStatusException.of(int)
instead.