private ResponsePayload retrieveResponsePayload(long serialId) throws InterruptedException {
        ResponsePayloadWasNeverRegistered last = null;
        for (int i = 0; i <= 10; i++) {
            try {
                RetrievePayloadFromServer result =
                    remoteOperationService().execute(new RetrievePayloadFromServer(serialId));
                return result.getResponsePayload();
            } catch (ResponsePayloadWasNeverRegistered e) {
                Thread.sleep(300);
                last = e;
            } catch (Throwable e) {
                throw new ServerWarpExecutionException("failed to retrieve a response payloade: " + e.getMessage(), e);
            }
        }
        throw last;
    }
private ResponsePayload retrieveResponsePayload ( long serialId ) throws InterruptedException { ResponsePayloadWasNeverRegistered last = null ; for ( int i = 0 ; i <= 10 ; i ++ ) { try { RetrievePayloadFromServer result = remoteOperationService ( ) . execute ( new RetrievePayloadFromServer ( serialId ) ) ; return result . getResponsePayload ( ) ; } catch ( ResponsePayloadWasNeverRegistered e ) { Thread . sleep ( 300 ) ; last = e ; } catch ( Throwable e ) { throw new ServerWarpExecutionException ( "failed to retrieve a response payloade: " + e . getMessage ( ) , e ) ; } } throw last ; }
Contacts server and tries to retrieve response payload via serialId.
<p>
Repeats the retrieval until the payload is found or number of allowed iterations is reached.