Package org.teamcascade.java.brjc.api

Examples of org.teamcascade.java.brjc.api.RestClientException


      @Override
      public T apply(Response response) {
        try {
          final String body = response.getEntity();
          final Collection<ErrorCollection> errorMessages = extractErrors(response.getStatusCode(), body);
          throw new RestClientException(errorMessages, response.getStatusCode());
        } catch (JSONException e) {
          throw new RestClientException(e, response.getStatusCode());
        }
      }
    };
  }
View Full Code Here


      @Override
      public T apply(@Nullable Response input) {
        try {
          return responseHandler.handle(input);
        } catch (JSONException e) {
          throw new RestClientException(e);
        } catch (IOException e) {
          throw new RestClientException(e);
        }
      }
    };
  }
View Full Code Here

          public InputStream getInputStream() {
            try {
              return new ByteArrayInputStream(generator.generate(bean).toString().getBytes(Charset
                  .forName("UTF-8")));
            } catch (JSONException e) {
              throw new RestClientException(e);
            }
          }
        };
      }
    };
View Full Code Here

  public static URI parseURI(final String str) {
    try {
      return new URI(str);
    } catch (URISyntaxException e) {
      throw new RestClientException(e);
    }
  }
View Full Code Here

  public static DateTime parseDateTime(final String str) {
    try {
      return BAMBOO_DATE_TIME_FORMATTER.parseDateTime(str);
    } catch (Exception e) {
      throw new RestClientException(e);
    }
  }
View Full Code Here

      return BAMBOO_DATE_TIME_FORMATTER.parseDateTime(str);
    } catch (Exception ignored) {
      try {
        return BAMBOO_DATE_FORMATTER.parseDateTime(str);
      } catch (Exception e) {
        throw new RestClientException(e);
      }
    }
  }
View Full Code Here

  public static DateTime parseDate(final String str) {
    try {
      return BAMBOO_DATE_FORMATTER.parseDateTime(str);
    } catch (Exception e) {
      throw new RestClientException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.teamcascade.java.brjc.api.RestClientException

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.