code: public void init()
      {
  
          InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("esindexer.xml");
          XStream xStream = getXStreamObject();
  
          if (inStream != null)
          {
              Object o = xStream.fromXML(inStream);
              IndexerProperties indexerProperties = (IndexerProperties) o;
              List<Node> nodes = indexerProperties.getNodes();
  
              if (nodes == null || (nodes != null && nodes.isEmpty()))
              {
                  log.error("Nodes should not be empty/null");
                  throw new IndexingException("Nodes should not be empty/null");
              }
              else
              {
                  if (client == null)
                  {
                      client = TransportClient.builder().build();
                  }
                  for (Node node : nodes)
                  {
                      Properties properties = node.getProperties();
                      if (properties != null)
                      {
                          if (properties.getProperty("host") == null
                                  || !StringUtils.isNumeric(properties.getProperty("port"))
                                  || properties.getProperty("port").isEmpty())
                          {
                              log.error("Host or port should not be null / port should be numeric");
                              throw new IllegalArgumentException(
                                      "Host or port should not be null / port should be numeric");
                          }
                          ((TransportClient) client).addTransportAddress(
                                  new InetSocketTransportAddress(new InetSocketAddress(properties.getProperty("host"),
                                          Integer.parseInt(properties.getProperty("port")))));
                      }
                  }
              }
          }
          else
          {
              log.error("No indexer setting provided, please provide valid indexer settings in esindexer.xml");
              throw new IndexingException(
                      "No indexer setting provided, please provide valid indexer settings in esindexer.xml");
          }
      }
docs: Inits the.