public abstract class JsonService extends Object implements Service
Service
that encodes requests and responses as JSON.Service.CatalogsRequest, Service.CloseConnectionRequest, Service.CloseConnectionResponse, Service.CloseStatementRequest, Service.CloseStatementResponse, Service.ColumnsRequest, Service.ConnectionSyncRequest, Service.ConnectionSyncResponse, Service.CreateStatementRequest, Service.CreateStatementResponse, Service.ExecuteResponse, Service.Factory, Service.FetchRequest, Service.FetchResponse, Service.PrepareAndExecuteRequest, Service.PrepareRequest, Service.PrepareResponse, Service.Request, Service.Response, Service.ResultSetResponse, Service.SchemasRequest, Service.TablesRequest, Service.TableTypesRequest| Modifier and Type | Field and Description |
|---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
MAPPER |
| Constructor and Description |
|---|
JsonService() |
public abstract String apply(String request)
protected static <T> T decode(String response, Class<T> valueType) throws IOException
IOExceptionprotected static <T> String encode(T request) throws IOException
IOExceptionprotected RuntimeException handle(IOException e)
public Service.ResultSetResponse apply(Service.CatalogsRequest request)
public Service.ResultSetResponse apply(Service.SchemasRequest request)
public Service.ResultSetResponse apply(Service.TablesRequest request)
public Service.ResultSetResponse apply(Service.TableTypesRequest request)
public Service.ResultSetResponse apply(Service.ColumnsRequest request)
public Service.PrepareResponse apply(Service.PrepareRequest request)
public Service.ExecuteResponse apply(Service.PrepareAndExecuteRequest request)
public Service.FetchResponse apply(Service.FetchRequest request)
public Service.CreateStatementResponse apply(Service.CreateStatementRequest request)
public Service.CloseStatementResponse apply(Service.CloseStatementRequest request)
public Service.CloseConnectionResponse apply(Service.CloseConnectionRequest request)
public Service.ConnectionSyncResponse apply(Service.ConnectionSyncRequest request)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.