{@inheritDoc}

@see ResultHandler#handleResult(Object)
432934
@Override
    public void handleResult(RHI result) {
        if (wrappedResultHandler != null) {
            wrappedResultHandler.handleResult(resultTransformer.transform(result));
        }
    }
928480
public final void requestProcessed (Object result)
    {
        @SuppressWarnings("unchecked") T casted = (T)result;
        requestCompleted(casted);
    }
654366
public static void check(final Object result, final Class<?> targetType) {
        if (result != null && !targetType.isAssignableFrom(result.getClass())) {
            // note: conversion logic may go wrong (e.g. because converter expect collection input mostly and may
            // not work correctly for single element), but anyway overall conversion would be considered failed.
            throw new ResultConversionException(String.format("Failed to convert %s to %s",
                    toStringType(result), targetType.getSimpleName()));
        }
    }
1265632
public static <T extends Entity> T handleRow(T row, int columnCount, ResultSetMetaData meta, ResultSet rs, boolean withMetaInfo) throws SQLException {
		String columnLabel;
		int type;
		for (int i = 1; i <= columnCount; i++) {
			columnLabel = meta.getColumnLabel(i);
			type = meta.getColumnType(i);
			row.put(columnLabel, getColumnValue(rs, columnLabel, type, null));
		}
		if (withMetaInfo) {
			row.setTableName(meta.getTableName(1));
			row.setFieldNames(row.keySet());
		}
		return row;
	}
755565
public <V> V executeAndFetch(ResultSetHandler<V> handler) {
        try (ResultSet rs = executeQuery()) {
            return handler.apply(rs);
        } catch (SQLException ex) {
            throw new ApplicationException(Code.BACKEND_ERROR, ex);
        }
    }
427220
public void processResponse(Object results, Object status) {
        ElevationStatus pStatus = ElevationStatus.UNKNOWN_ERROR;
        
        if (status instanceof String && results instanceof JSObject) {
            pStatus = ElevationStatus.valueOf((String) status);
            if (ElevationStatus.OK.equals(pStatus)) {
                JSObject jsres = (JSObject) results;
                Object len = jsres.getMember("length");
                if (len instanceof Number) {
                    int n = ((Number)len).intValue();
                    ElevationResult[] ers = new ElevationResult[n];
                    for (int i = 0; i < n; i++) {
                        Object obj = jsres.getSlot(i);
                        if (obj instanceof JSObject) {
                            ers[i] = new ElevationResult((JSObject) obj);
                        }
                    }
                    callback.elevationsReceived(ers, pStatus);
                    return;
                }
            }
        }
        callback.elevationsReceived(new ElevationResult[]{}, pStatus);
    }
610911
private IAsyncResultHandler<IEngineResult> wrapResultHandler(final IAsyncResultHandler<IEngineResult> handler) {
        return (IAsyncResult<IEngineResult> result) -> {
            boolean doRecord = true;
            if (result.isError()) {
                recordErrorMetrics(result.getError());
            } else {
                IEngineResult engineResult = result.getResult();
                if (engineResult.isFailure()) {
                    recordFailureMetrics(engineResult.getPolicyFailure());
                } else {
                    recordSuccessMetrics(engineResult.getApiResponse());
                    doRecord = false; // don't record the metric now because we need to record # of bytes downloaded, which hasn't happened yet
                }
            }
            requestMetric.setRequestEnd(new Date());
            if (doRecord) {
                metrics.record(requestMetric);
            }
            handler.handle(result);
        };
    }
150991
@Override
    public <T> Handler<AsyncResult<T>> toHandler(Resolver<T> resolver) {
        return result -> {
            if (result.succeeded()) {
                resolver.resolve(result.result());
            } else {
                resolver.reject(result.cause());
            }
        };
    }
325129
public function addResult($item, $handler)
    {
        $this->result[] = $item;
        $this->events[] = array($item, $handler);
        $this->count++;
    }
1258670
public void processResponse(Object result) {
        if (result instanceof JSObject) {
            MaxZoomResult mzr = new MaxZoomResult((JSObject) result);
            callback.maxZoomReceived(mzr);
        }
    }
244013
public ResultHandlerContext<DPO, RI, RO, RHI> handleWith(ResultHandler<RHI> resultHandler) {
        if (resultHandler != null) {
            addedResultHandlers.add(resultHandler);
            builtValidator.addResultHandler(resultHandler);
        }

        // Stay in the same context and re-use the same instance because no type has changed
        return this;
    }
709066
def _wrap_result(self, response):
        
        if isinstance(response, int):
            response = self._wrap_response(response)

        return HandlerResult(
            status=HandlerStatus.RETURN,
            message_out=self._response_proto(**response),
            message_type=self._response_type)
661182
function gotResults(results) {
  results.JSONquery = JSON.stringify(results.query, null, 2);
  console.log('gotResults', results);
  updateResults(results);
}
976494
@Override
    public void handle(T result, HttpResponse response) {
        String restoreHeader = response.getHeaders().get(Headers.RESTORE);
        if (restoreHeader != null) {
            result.setRestoreExpirationTime(parseDate(restoreHeader));
            Boolean onGoingRestore = parseBoolean(restoreHeader);
            if (onGoingRestore != null) {
                result.setOngoingRestore(onGoingRestore);
            }
        }
    }
4741
function catchResults (resolve, reject, err, client, done) {
	//debug.log('catchResults()...');
	if (err) {
		return reject(err);
	}
	resolve({"client":client, "done":done});
}
949913
protected function handleResult(ContextInterface $context, $result)
    {
        $validated = $this->validateResult($result);
        if (is_null($validated)) {
            $validated = $result;
        }

        if ($validated instanceof ContextInterface) {
            $context = $validated;
        } elseif (!is_null($validated)) {
            $context->setResult($validated);
        }

        return $context;
    }
522298
protected <T> TypedResult<T> handleMissingResult() {
		// check if the monitoring thread is still there
		// we need to wait until we know what is going on
		if (monitoringThread.isAlive()) {
			return TypedResult.empty();
		}
		// the job finished with an exception
		else if (executionException != null) {
			throw executionException;
		}
		// we assume that a bounded job finished
		else {
			return TypedResult.endOfStream();
		}
	}