Package com.cloudcontrolled.api.client.util

Examples of com.cloudcontrolled.api.client.util.Timer.toc()


  protected <T> Response<T> doGet(WebClient webClient, Request<T> request) {
    webClient = webClient.path(inquirePath(request));

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

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

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


  protected <T> Response<T> doPost(WebClient webClient, Request<T> request) {
    webClient = webClient.path(inquirePath(request));

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

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

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

  protected <T> Response<T> doPut(WebClient webClient, Request<T> request) {
    webClient = webClient.path(inquirePath(request));

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

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

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

  protected <T> Response<T> doDelete(WebClient webClient, Request<T> request) {
    webClient = webClient.path(inquirePath(request));

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

    log.debug(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.