public void executeRpcRequestBatch(
      final JsonArray rpcRequestBatch, final JsonResponseStreamer streamer) throws IOException {
    try (JsonGenerator generator = getJsonObjectMapper().getFactory().createGenerator(streamer)) {
      generator.writeStartArray();
      for (int i = 0; i < rpcRequestBatch.size(); i++) {
        JsonRpcResponse response = processMaybeRequest(rpcRequestBatch.getValue(i));
        if (response.getType() != RpcResponseType.NONE) {
          generator.writeObject(response);
        }
      }
      generator.writeEndArray();
    }
  }
Executes a batch of RPC requests.

@param rpcRequestBatch the batch of RPC requests.
@param streamer the JsonResponseStreamer to use.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/handlers/JsonRpcArrayExecutor.java