public void accept(Boolean resendable) { if (!isResendable) { checkFirstRequest(); throw new ResourceNotResendableException( "Cannot retry request for " + path); } } };
public void accept(Boolean resendable) { if (!isResendable) { checkFirstRequest(); throw new ResourceNotResendableException("Cannot retry request for " + path); } } };
private void executeRequest(CallResponseImpl responseImpl) { SessionState session = getSession(); //TODO: Add a telemetry agent if needed // requestBuilder = addTelemetryAgentId(requestBuilder); boolean hasStreamingPart = hasStreamingPart(); Consumer<Boolean> resendableConsumer = resendable -> { if (hasStreamingPart) { checkFirstRequest(); throw new ResourceNotResendableException( "Cannot retry request for " + getEndpoint()); } }; Function<Request.Builder, Response> sendRequestFunction = requestBldr -> { if (isFirstRequest() && hasStreamingPart) makeFirstRequest(callBaseUri, "", 0); Response response = sendRequestOnce(requestBldr); if (isFirstRequest()) setFirstRequest(false); return response; }; Response response = sendRequestWithRetry(requestBldr, sendRequestFunction, resendableConsumer); if(session != null) { List<ClientCookie> cookies = new ArrayList<>(); for ( String setCookie : response.headers(HEADER_SET_COOKIE) ) { ClientCookie cookie = ClientCookie.parse(requestBldr.build().url(), setCookie); cookies.add(cookie); } ((SessionStateImpl)session).setCookies(cookies); } checkStatus(response); responseImpl.setResponse(response); }
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + connectPath);
throw new ResourceNotResendableException( "Cannot retry request for " + path);
throw new ResourceNotResendableException( "Cannot retry request for " + ((uri != null) ? uri : "new document"));
throw new ResourceNotResendableException( "Cannot retry request for " + ((uri != null) ? uri : "new document"));
throw new ResourceNotResendableException( "Cannot retry request for " + ((uri != null) ? uri : "new document"));
throw new ResourceNotResendableException( "Cannot retry request for " + ((uri != null) ? uri : "new document"));
throw new ResourceNotResendableException( "Cannot retry request for " + connectPath);
if (!isResendable) { checkFirstRequest(); throw new ResourceNotResendableException( "Cannot retry request for " + path);