private <T> Observable<PollingState<T>> updateStateFromGetResourceOperationAsync(final PollingState<T> pollingState, String url) {
        return pollAsync(url, pollingState.loggingContext())
                .flatMap(new Func1<Response<ResponseBody>, Observable<PollingState<T>>>() {
                    @Override
                    public Observable<PollingState<T>> call(Response<ResponseBody> response) {
                        try {
                            pollingState.updateFromResponseOnPutPatch(response);
                            return Observable.just(pollingState);
                        } catch (CloudException | IOException e) {
                            return Observable.error(e);
                        }
                    }
                });
    }
private < T > Observable < PollingState < T > > updateStateFromGetResourceOperationAsync ( final PollingState < T > pollingState , String url ) { return pollAsync ( url , pollingState . loggingContext ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < PollingState < T > > > ( ) { @ Override public Observable < PollingState < T > > call ( Response < ResponseBody > response ) { try { pollingState . updateFromResponseOnPutPatch ( response ) ; return Observable . just ( pollingState ) ; } catch ( CloudException | IOException e ) { return Observable . error ( e ) ; } } } ) ; }
Polls from the provided URL and updates the polling state with the
polling response.

@param pollingState the polling state for the current operation.
@param url the url to poll from
@param <T> the return type of the caller.