| Package | Description |
|---|---|
| com.linecorp.armeria.client.circuitbreaker |
Failure detection and fallback mechanism based on
circuit breaker pattern.
|
| com.linecorp.armeria.client.retry |
A
Client decorator that handles failures and retries requests. |
| com.linecorp.armeria.common |
Common types.
|
| com.linecorp.armeria.internal.common |
Various classes used internally.
|
| com.linecorp.armeria.server |
Server core.
|
| com.linecorp.armeria.server.annotation |
Annotations for building a RESTful service.
|
| Modifier and Type | Method and Description |
|---|---|
static CircuitBreakerStrategy |
CircuitBreakerStrategy.onStatus(BiFunction<HttpStatus,Throwable,Boolean> function)
Returns the
CircuitBreakerStrategy that determines a Response as successful
using the specified BiFunction. |
| Modifier and Type | Method and Description |
|---|---|
static RetryStrategy |
RetryStrategy.onStatus(BiFunction<HttpStatus,Throwable,Backoff> backoffFunction)
Returns the
RetryStrategy that decides to retry the request using the specified
backoffFunction. |
| Modifier and Type | Field and Description |
|---|---|
static HttpStatus |
HttpStatus.ACCEPTED
202 Accepted.
|
static HttpStatus |
HttpStatus.BAD_GATEWAY
502 Bad Gateway.
|
static HttpStatus |
HttpStatus.BAD_REQUEST
400 Bad Request.
|
static HttpStatus |
HttpStatus.CLIENT_CLOSED_REQUEST
499 Client Closed Request.
|
static HttpStatus |
HttpStatus.CONFLICT
409 Conflict.
|
static HttpStatus |
HttpStatus.CONTINUE
100 Continue.
|
static HttpStatus |
HttpStatus.CREATED
201 Created.
|
static HttpStatus |
HttpStatus.EXPECTATION_FAILED
417 Expectation Failed.
|
static HttpStatus |
HttpStatus.FAILED_DEPENDENCY
424 Failed Dependency (WebDAV, RFC4918).
|
static HttpStatus |
HttpStatus.FORBIDDEN
403 Forbidden.
|
static HttpStatus |
HttpStatus.FOUND
302 Found.
|
static HttpStatus |
HttpStatus.GATEWAY_TIMEOUT
504 Gateway Timeout.
|
static HttpStatus |
HttpStatus.GONE
410 Gone.
|
static HttpStatus |
HttpStatus.HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported.
|
static HttpStatus |
HttpStatus.INSUFFICIENT_STORAGE
507 Insufficient Storage (WebDAV, RFC4918).
|
static HttpStatus |
HttpStatus.INTERNAL_SERVER_ERROR
500 Internal Server Error.
|
static HttpStatus |
HttpStatus.LENGTH_REQUIRED
411 Length Required.
|
static HttpStatus |
HttpStatus.LOCKED
423 Locked (WebDAV, RFC4918).
|
static HttpStatus |
HttpStatus.METHOD_NOT_ALLOWED
405 Method Not Allowed.
|
static HttpStatus |
HttpStatus.MISDIRECTED_REQUEST
421 Misdirected Request.
|
static HttpStatus |
HttpStatus.MOVED_PERMANENTLY
301 Moved Permanently.
|
static HttpStatus |
HttpStatus.MULTI_STATUS
207 Multi-Status (WebDAV, RFC2518).
|
static HttpStatus |
HttpStatus.MULTIPLE_CHOICES
300 Multiple Choices.
|
static HttpStatus |
HttpStatus.NETWORK_AUTHENTICATION_REQUIRED
511 Network Authentication Required (RFC6585).
|
static HttpStatus |
HttpStatus.NO_CONTENT
204 No Content.
|
static HttpStatus |
HttpStatus.NON_AUTHORITATIVE_INFORMATION
203 Non-Authoritative Information (since HTTP/1.1).
|
static HttpStatus |
HttpStatus.NOT_ACCEPTABLE
406 Not Acceptable.
|
static HttpStatus |
HttpStatus.NOT_EXTENDED
510 Not Extended (RFC2774).
|
static HttpStatus |
HttpStatus.NOT_FOUND
404 Not Found.
|
static HttpStatus |
HttpStatus.NOT_IMPLEMENTED
501 Not Implemented.
|
static HttpStatus |
HttpStatus.NOT_MODIFIED
304 Not Modified.
|
static HttpStatus |
HttpStatus.OK
200 OK.
|
static HttpStatus |
HttpStatus.PARTIAL_CONTENT
206 Partial Content.
|
static HttpStatus |
HttpStatus.PAYMENT_REQUIRED
402 Payment Required.
|
static HttpStatus |
HttpStatus.PRECONDITION_FAILED
412 Precondition Failed.
|
static HttpStatus |
HttpStatus.PRECONDITION_REQUIRED
428 Precondition Required (RFC6585).
|
static HttpStatus |
HttpStatus.PROCESSING
102 Processing (WebDAV, RFC2518).
|
static HttpStatus |
HttpStatus.PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required.
|
static HttpStatus |
HttpStatus.REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large.
|
static HttpStatus |
HttpStatus.REQUEST_HEADER_FIELDS_TOO_LARGE
431 Request Header Fields Too Large (RFC6585).
|
static HttpStatus |
HttpStatus.REQUEST_TIMEOUT
408 Request Timeout.
|
static HttpStatus |
HttpStatus.REQUEST_URI_TOO_LONG
414 Request-URI Too Long.
|
static HttpStatus |
HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable.
|
static HttpStatus |
HttpStatus.RESET_CONTENT
205 Reset Content.
|
static HttpStatus |
HttpStatus.SEE_OTHER
303 See Other (since HTTP/1.1).
|
static HttpStatus |
HttpStatus.SERVICE_UNAVAILABLE
503 Service Unavailable.
|
static HttpStatus |
HttpStatus.SWITCHING_PROTOCOLS
101 Switching Protocols.
|
static HttpStatus |
HttpStatus.TEMPORARY_REDIRECT
307 Temporary Redirect (since HTTP/1.1).
|
static HttpStatus |
HttpStatus.TOO_MANY_REQUESTS
429 Too Many Requests (RFC6585).
|
static HttpStatus |
HttpStatus.UNAUTHORIZED
401 Unauthorized.
|
static HttpStatus |
HttpStatus.UNKNOWN
A special status code '0' which represents that the response status is unknown.
|
static HttpStatus |
HttpStatus.UNORDERED_COLLECTION
425 Unordered Collection (WebDAV, RFC3648).
|
static HttpStatus |
HttpStatus.UNPROCESSABLE_ENTITY
422 Unprocessable Entity (WebDAV, RFC4918).
|
static HttpStatus |
HttpStatus.UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type.
|
static HttpStatus |
HttpStatus.UPGRADE_REQUIRED
426 Upgrade Required (RFC2817).
|
static HttpStatus |
HttpStatus.USE_PROXY
305 Use Proxy (since HTTP/1.1).
|
static HttpStatus |
HttpStatus.VARIANT_ALSO_NEGOTIATES
506 Variant Also Negotiates (RFC2295).
|
| Modifier and Type | Method and Description |
|---|---|
HttpStatus |
AggregatedHttpResponse.status()
Returns the STATUS of this response.
|
static HttpStatus |
HttpStatus.valueOf(int statusCode)
Returns the
HttpStatus represented by the specified status code. |
static HttpStatus |
HttpStatus.valueOf(String statusText)
Returns the
HttpStatus represented by the specified status text. |
| Modifier and Type | Method and Description |
|---|---|
static ResponseHeadersBuilder |
ResponseHeaders.builder(HttpStatus status)
Returns a new builder with the specified
HttpStatus. |
int |
HttpStatus.compareTo(HttpStatus o)
Compares this status to the specified status.
|
boolean |
HttpStatusClass.contains(HttpStatus status)
Returns
true if and only if the specified HttpStatus falls into this class. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status)
Returns a new
ResponseHeaders with the specified HttpStatus. |
static HttpResponse |
HttpResponse.of(HttpStatus status)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status)
Creates a new HTTP response.
|
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name,
Object value)
Returns a new
ResponseHeaders with the specified HttpStatus and an additional header. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
Object value1,
CharSequence name2,
Object value2)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
Object value1,
CharSequence name2,
Object value2,
CharSequence name3,
Object value3)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
Object value1,
CharSequence name2,
Object value2,
CharSequence name3,
Object value3,
CharSequence name4,
Object value4)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name,
String value)
Returns a new
ResponseHeaders with the specified HttpStatus and an additional header. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
String value1,
CharSequence name2,
String value2)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
String value1,
CharSequence name2,
String value2,
CharSequence name3,
String value3)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
String value1,
CharSequence name2,
String value2,
CharSequence name3,
String value3,
CharSequence name4,
String value4)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static HttpResponse |
HttpResponse.of(HttpStatus status,
MediaType mediaType,
byte[] content)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status,
MediaType mediaType,
byte[] content)
Creates a new HTTP response of the specified
HttpStatus. |
static HttpResponse |
HttpResponse.of(HttpStatus status,
MediaType mediaType,
CharSequence content)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status,
MediaType mediaType,
CharSequence content)
Creates a new HTTP response of the specified
HttpStatus. |
static HttpResponse |
HttpResponse.of(HttpStatus status,
MediaType mediaType,
HttpData content)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status,
MediaType mediaType,
HttpData content)
Creates a new HTTP response of the specified
HttpStatus. |
static HttpResponse |
HttpResponse.of(HttpStatus status,
MediaType mediaType,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status,
MediaType mediaType,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response of the specified
HttpStatus. |
static HttpResponse |
HttpResponse.of(HttpStatus status,
MediaType mediaType,
String content)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status,
MediaType mediaType,
String content)
Creates a new HTTP response of the specified
HttpStatus. |
static HttpResponse |
HttpResponse.of(HttpStatus status,
MediaType mediaType,
String format,
Object... args)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status,
MediaType mediaType,
String format,
Object... args)
Creates a new HTTP response of the specified
HttpStatus. |
default void |
HttpResponseWriter.respond(HttpStatus status)
Deprecated.
|
default void |
HttpResponseWriter.respond(HttpStatus status,
MediaType mediaType,
byte[] content)
Deprecated.
|
default void |
HttpResponseWriter.respond(HttpStatus status,
MediaType mediaType,
HttpData content)
Deprecated.
|
default void |
HttpResponseWriter.respond(HttpStatus status,
MediaType mediaType,
HttpData content,
HttpHeaders trailers)
Deprecated.
|
default void |
HttpResponseWriter.respond(HttpStatus status,
MediaType mediaType,
String content)
Deprecated.
|
default void |
HttpResponseWriter.respond(HttpStatus status,
MediaType mediaType,
String format,
Object... args)
Deprecated.
|
ResponseHeadersBuilder |
ResponseHeadersBuilder.status(HttpStatus status)
Sets the
":status" header. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
ArmeriaHttpUtil.isContentAlwaysEmptyWithValidation(HttpStatus status,
HttpData content,
HttpHeaders trailers)
Returns
true if the content of the response with the given HttpStatus is expected to
be always empty (1xx, 204, 205 and 304 responses.) |
| Modifier and Type | Method and Description |
|---|---|
HttpStatus |
HttpStatusException.httpStatus()
Returns the
HttpStatus which would be sent back to the client who sent the
corresponding request. |
| Modifier and Type | Method and Description |
|---|---|
static HttpStatusException |
HttpStatusException.of(HttpStatus status)
Returns a new
HttpStatusException instance with the specified HttpStatus. |
static HttpResponseException |
HttpResponseException.of(HttpStatus httpStatus)
Returns a new
HttpResponseException instance with the specified HttpStatus. |
static HttpStatusException |
HttpStatusException.of(HttpStatus status,
Throwable cause)
|
| Constructor and Description |
|---|
RedirectService(HttpStatus redirectStatus,
Function<? super ServiceRequestContext,String> locationFunction)
Creates a new instance that redirects to the location returned by
locationFunction,
preserving the query string in the request URI. |
RedirectService(HttpStatus redirectStatus,
Function<? super ServiceRequestContext,String> locationFunction,
boolean preserveQueryString)
Creates a new instance that redirects to the location returned by
locationFunction. |
RedirectService(HttpStatus redirectStatus,
String locationPattern)
Creates a new instance that redirects to the location constructed with the specified
locationPattern, preserving the query string in the request URI. |
RedirectService(HttpStatus redirectStatus,
String locationPattern,
boolean preserveQueryString)
Creates a new instance that redirects to the location constructed with the specified
locationPattern. |
| Modifier and Type | Method and Description |
|---|---|
static <T> HttpResult<T> |
HttpResult.of(HttpStatus status)
Creates a new
HttpResult with the specified HttpStatus and without content. |
static <T> HttpResult<T> |
HttpResult.of(HttpStatus status,
T content)
Creates a new
HttpResult with the specified HttpStatus and content. |
static <T> HttpResult<T> |
HttpResult.of(HttpStatus status,
T content,
HttpHeaders trailers)
Creates a new
HttpResult with the specified HttpStatus, content and trailers. |
Copyright © 2020 LeanCloud. All rights reserved.