Class JsonHandler
java.lang.Object
org.apache.calcite.avatica.remote.AbstractHandler<String>
org.apache.calcite.avatica.remote.JsonHandler
Implementation of
Handler
that decodes JSON requests, sends them to a Service,
and encodes the responses into JSON.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.avatica.remote.Handler
Handler.HandlerResponse<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.databind.ObjectMapperFields inherited from class org.apache.calcite.avatica.remote.AbstractHandler
serviceFields inherited from interface org.apache.calcite.avatica.remote.Handler
HANDLER_SERIALIZATION_METRICS_NAME, HTTP_INTERNAL_SERVER_ERROR, HTTP_OK, HTTP_UNAUTHENTICATED, HTTP_UNAUTHORIZED -
Constructor Summary
ConstructorsConstructorDescriptionJsonHandler(Service service, org.apache.calcite.avatica.metrics.MetricsSystem metrics) -
Method Summary
Modifier and TypeMethodDescriptionCompute a response for the given request, handling errors generated by that computation.Methods inherited from class org.apache.calcite.avatica.remote.AbstractHandler
convertToErrorResponse, setRpcMetadata, unauthenticatedErrorResponse, unauthorizedErrorResponse
-
Field Details
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
-
Constructor Details
-
JsonHandler
-
-
Method Details
-
apply
Description copied from class:AbstractHandlerCompute a response for the given request, handling errors generated by that computation.- Specified by:
applyin interfaceHandler<String>- Overrides:
applyin classAbstractHandler<String>- Parameters:
jsonRequest- The caller's request.- Returns:
- A
Service.Responsewith additional context about that response.
-