@Override
    public void initialize(Map<String, Param> params) throws TikaConfigException {
        healthUri = URI.create(apiBaseUri + "/ping");
        apiUri = URI.create(apiBaseUri + String.format(Locale.getDefault(),
                "/classify/image?topn=%1$d&min_confidence=%2$f", topN, minConfidence));

        try (CloseableHttpClient client = HttpClientBuilder.create().build()) {
            HttpResponse response = client.execute(new HttpGet(healthUri));
            available = response.getStatusLine().getStatusCode() == 200;

            LOG.info("Available = {}, API Status = {}", available, response.getStatusLine());
            LOG.info("topN = {}, minConfidence = {}", topN, minConfidence);
        } catch (Exception e) {
            available = false;
            throw new TikaConfigException(e.getMessage(), e);
        }
    }
Some variables are protected, because this class is extended by
TensorflowRESTVideoRecognizer class
tika-parsers/tika-parsers-ml/tika-parser-advancedmedia-module/src/main/java/org/apache/tika/parser/recognition/tf/TensorflowRESTRecogniser.java