public void handle(final Response restResponse) throws ResponseException { if (restResponse.isSuccessful()) { rpcUrlValid.set(true); } } });
public void handle(Response response) throws ResponseException { // this means the response indicates a redirection. if (response.getStatusCode() >= 300 && response.getStatusCode() < 400) { final String location = response.getHeader("Location"); if (location == null) { throw new ResponseException("manifest not found"); } LOG.info("Manifest request got redirected to '" + location + "'."); exception.set(new ManifestGotRedirectedException("manifest got redirected", location)); } else { checkStatusOk(response); try { manifestHolder.set(asManifest(response.getEntity(ManifestEntity.class))); } catch (Exception ex) { exception.set(new ResponseContentException(response, ex)); } } } });
public void handle(Response response) throws ResponseException { // this means the response indicates a redirection. if (response.getStatusCode() >= 300 && response.getStatusCode() < 400) { final String location = response.getHeader("Location"); if (location == null) { throw new ResponseException("manifest not found"); } LOG.info("Manifest request got redirected to '" + location + "'."); exception.set(new ManifestGotRedirectedException("manifest got redirected", location)); } else if (response.isSuccessful()) { try { manifestHolder.set(asManifest(response.getEntity(ManifestEntity.class))); } catch (Exception ex) { exception.set(ex); } } } });
exception.set((Throwable) ObjectUtils.defaultIfNull(re.getCause(), re)); } finally { Thread.currentThread().setContextClassLoader(currentContextClassloader);
exception.set((Throwable) ObjectUtils.defaultIfNull(re.getCause(), re));
public void handle(final Response response) throws ResponseException { responseHolder.set(response); List<OAuth.Parameter> parameters = OAuth.decodeForm(response.getResponseBodyAsString()); Map<String, String> map = OAuth.newMap(parameters); oauthParametersHolder.set(map); } catch (Exception e) { throw new ResponseException("Failed to get token from service provider. Couldn't parse response body " + response.getResponseBodyAsString() + "'", e);
errorMessage.set("Communication error: " + re.getMessage());