Package com.cloudcontrolled.api.client.exception

Examples of com.cloudcontrolled.api.client.exception.CommunicationErrorException


    HttpStatus status = HttpStatus.getStatus(createTokenResponse.getStatusCode());
    if (status.isError()) {
      if (status.equals(HttpStatus.Unauthorized)) {
        throw new AuthorizationException(HttpStatus.Unauthorized.toString());
      } else {
        throw new CommunicationErrorException(status);
      }
    }

    String newToken = createTokenResponse.getToken();
    tokenStore.setToken(newToken);
View Full Code Here


  @Override
  @SuppressWarnings("unchecked")
  public <T> T send(Request<T> request) {

    if (request == null) {
      throw new CommunicationErrorException("Request cannot be null.");
    }
    PathUtil.infixPotentialDefaults(request);
    ValidationUtil.validate(request);

    T response;
View Full Code Here

      case PUT:
        return doPut(webClient, request);
      case DELETE:
        return doDelete(webClient, request);
      default:
        throw new CommunicationErrorException(HttpStatus.Not_Implemented);
    }
  }
View Full Code Here

TOP

Related Classes of com.cloudcontrolled.api.client.exception.CommunicationErrorException

Copyright © 2018 www.massapicom. 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.