public interface Handler
| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_NOT_DEFINED |
static org.slf4j.Logger |
logger |
static String |
STATUS_VALIDATION_ERROR |
| Modifier and Type | Method and Description |
|---|---|
default String |
getStatus(io.undertow.server.HttpServerExchange exchange,
com.networknt.status.Status status)
There are situations that the downstream service returns an error status response and we just
want to bubble up to the caller and eventually to the original caller.
|
default String |
getStatus(io.undertow.server.HttpServerExchange exchange,
String code,
Object... args)
Return a Status object so that the handler can get the HTTP response code to set exchange response.
|
ByteBuffer |
handle(io.undertow.server.HttpServerExchange exchange,
Object object) |
default ByteBuffer |
validate(String serviceId,
Object object) |
static final org.slf4j.Logger logger
static final String ERROR_NOT_DEFINED
static final String STATUS_VALIDATION_ERROR
ByteBuffer handle(io.undertow.server.HttpServerExchange exchange, Object object)
default ByteBuffer validate(String serviceId, Object object)
default String getStatus(io.undertow.server.HttpServerExchange exchange, String code, Object... args)
exchange - HttpServerExchange used to set the response codecode - Error code defined in status.ymlargs - A number of arguments in the error descriptiondefault String getStatus(io.undertow.server.HttpServerExchange exchange, com.networknt.status.Status status)
exchange - HttpServerExchangestatus - error statusCopyright © 2019. All rights reserved.