Package com.apitrary.api.client.common

Examples of com.apitrary.api.client.common.Timer.toc()


  protected <T> Response<T> doGet(Request<T> request) {
    URI uri = buidURI(request);
   
    Timer timer = Timer.tic();
    TransportResult result = getApiClientTransportFactory().newTransport(api).doGet(uri);
    timer.toc();
   
    log.trace(result.getStatusCode() + " " + uri.toString() + " took " + timer.getDifference() + "ms");

    Response<T> response = toResponse(timer, result, request);
View Full Code Here


    String payload = RequestUtil.getRequestPayload(request);
    URI uri = buidURI(request);

    Timer timer = Timer.tic();
    TransportResult result = getApiClientTransportFactory().newTransport(api).doPost(uri, payload);
    timer.toc();

    log.trace(result.getStatusCode() + " " + uri.toString() + " took " + timer.getDifference() + "ms");

    Response<T> response = toResponse(timer, result, request);
View Full Code Here

    String payload = RequestUtil.getRequestPayload(request);
    URI uri = buidURI(request);
   
    Timer timer = Timer.tic();
    TransportResult result = getApiClientTransportFactory().newTransport(api).doPut(uri, payload);
    timer.toc();

    log.trace(result.getStatusCode() + " " + uri.toString() + " took " + timer.getDifference() + "ms");

    Response<T> response = toResponse(timer, result, request);
View Full Code Here

  protected <T> Response<T> doDelete(Request<T> request) {
    URI uri = buidURI(request);
   
    Timer timer = Timer.tic();
    TransportResult result = getApiClientTransportFactory().newTransport(api).doDelete(uri);
    timer.toc();

    log.trace(result.getStatusCode() + " " + uri.toString() + " took " + timer.getDifference() + "ms");

    Response<T> response = toResponse(timer, result, request);
View Full Code Here

    webClient = webClient.path(inquirePath(request));
    webClient = RequestUtil.resolveAndSetQueryPart(request, webClient);

    Timer timer = Timer.tic();
    javax.ws.rs.core.Response cxfResponse = webClient.get();
    timer.toc();

    log.trace(cxfResponse.getStatus() + " " + webClient.getCurrentURI() + " took " + timer.getDifference() + "ms");

    Response<T> response = toResponse(timer, cxfResponse, request);
View Full Code Here

    String payload = RequestUtil.getRequestPayload(request);

    Timer timer = Timer.tic();
    javax.ws.rs.core.Response cxfResponse = webClient.post(payload);
    timer.toc();

    log.trace(cxfResponse.getStatus() + " " + webClient.getCurrentURI() + " took " + timer.getDifference() + "ms");

    Response<T> response = toResponse(timer, cxfResponse, request);
View Full Code Here

    String payload = RequestUtil.getRequestPayload(request);

    Timer timer = Timer.tic();
    javax.ws.rs.core.Response cxfResponse = webClient.put(payload);
    timer.toc();

    log.trace(cxfResponse.getStatus() + " " + webClient.getCurrentURI() + " took " + timer.getDifference() + "ms");

    Response<T> response = toResponse(timer, cxfResponse, request);
View Full Code Here

    webClient = webClient.path(inquirePath(request));
    webClient = RequestUtil.resolveAndSetQueryPart(request, webClient);

    Timer timer = Timer.tic();
    javax.ws.rs.core.Response cxfResponse = webClient.delete();
    timer.toc();

    log.trace(cxfResponse.getStatus() + " " + webClient.getCurrentURI() + " took " + timer.getDifference() + "ms");

    Response<T> response = toResponse(timer, cxfResponse, request);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.