use of com.facebook.stetho.inspector.jsonrpc.PendingRequest in project stetho by facebook.
the class ChromeDevtoolsServer method handleRemoteResponse.
private void handleRemoteResponse(JsonRpcPeer peer, JSONObject responseNode) throws MismatchedResponseException {
JsonRpcResponse response = mObjectMapper.convertValue(responseNode, JsonRpcResponse.class);
PendingRequest pendingRequest = peer.getAndRemovePendingRequest(response.id);
if (pendingRequest == null) {
throw new MismatchedResponseException(response.id);
}
if (pendingRequest.callback != null) {
pendingRequest.callback.onResponse(peer, response);
}
}
Aggregations