public class MockJsonService extends JsonService
Service
that encodes its requests and responses as JSON
and looks up responses from a pre-defined map.| Modifier and Type | Class and Description |
|---|---|
static class |
MockJsonService.Factory
Factory that creates a
MockJsonService. |
Service.CatalogsRequest, Service.CloseConnectionRequest, Service.CloseConnectionResponse, Service.CloseStatementRequest, Service.CloseStatementResponse, Service.ColumnsRequest, Service.ConnectionSyncRequest, Service.ConnectionSyncResponse, Service.CreateStatementRequest, Service.CreateStatementResponse, Service.ExecuteResponse, Service.FetchRequest, Service.FetchResponse, Service.PrepareAndExecuteRequest, Service.PrepareRequest, Service.PrepareResponse, Service.Request, Service.Response, Service.ResultSetResponse, Service.SchemasRequest, Service.TablesRequest, Service.TableTypesRequestMAPPER| Constructor and Description |
|---|
MockJsonService(Map<String,String> map) |
| Modifier and Type | Method and Description |
|---|---|
String |
apply(String request)
Derived class should implement this method to transport requests and
responses to and from the peer service.
|
public String apply(String request)
JsonServiceapply in class JsonServiceCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.