private class ProtobufHandler implements RequestHandler {
@Override
public void handle(Request request, Response response) throws Exception {
- WsClient client = wsClientFactory.newClient(request.getLocalConnector());
+ WsClient client = wsClientFactory.newClient(request.localConnector());
WsCe.TaskTypesWsResponse ceTaskTypes = client.ce().taskTypes();
response.stream().setStatus(ceTaskTypes.getTaskTypesCount() > 0 ? 200 : 500);
private class JsonHandler implements RequestHandler {
@Override
public void handle(Request request, Response response) throws Exception {
- WsClient client = wsClientFactory.newClient(request.getLocalConnector());
+ WsClient client = wsClientFactory.newClient(request.localConnector());
WsResponse jsonResponse = client.wsConnector().call(new GetRequest("api/issues/search"));
boolean ok = jsonResponse.contentType().equals(MediaTypes.JSON)
private class RequirePermissionHandler implements RequestHandler {
@Override
public void handle(Request request, Response response) throws Exception {
- WsClient client = wsClientFactory.newClient(request.getLocalConnector());
+ WsClient client = wsClientFactory.newClient(request.localConnector());
WsResponse jsonResponse = client.wsConnector().call(new GetRequest("api/system/info"));
* public class MyRequestHandler implements RequestHandler {
* {@literal @}Override
* public void handle(Request request, Response response) {
- * WsClient wsClient = WsClientFactories.getLocal().newClient(request.getLocalConnector());
+ * WsClient wsClient = WsClientFactories.getLocal().newClient(request.localConnector());
* SearchWsResponse issues = wsClient.issues().search(new SearchWsRequest());
* // ...
* }
* }
* </pre>
*
- * Since version 5.5, a web service can call another web service to get some data. See {@link Request#getLocalConnector()}
+ * Since version 5.5, a web service can call another web service to get some data. See {@link Request#localConnector()}
* provided by {@link RequestHandler#handle(Request, Response)}.
*
* @since 4.2
assertThat(client).isInstanceOf(DefaultWsClient.class);
assertThat(client.wsConnector()).isInstanceOf(LocalWsConnector.class);
- assertThat(((LocalWsConnector) client.wsConnector()).getLocalConnector()).isSameAs(connector);
+ assertThat(((LocalWsConnector) client.wsConnector()).localConnector()).isSameAs(connector);
}
}