private static WebSocketConnectOptions buildWebSocketConnectOptions(
      final EthStatsConnectOptions ethStatsConnectOptions) {
    // if user specified scheme is null, default ssl to true, otherwise set ssl to true for wss
    // scheme.
    final boolean isSSL =
        ethStatsConnectOptions.getScheme() == null
            || ethStatsConnectOptions.getScheme().equalsIgnoreCase("wss");
    return new WebSocketConnectOptions()
        .setURI("/api")
        .setSsl(isSSL)
        .setHost(ethStatsConnectOptions.getHost())
        .setPort(getWsPort(ethStatsConnectOptions, isSSL));
  }
Instantiates a new EthStatsService.

@param ethStatsConnectOptions the ethstats options
@param blockchainQueries the blockchain queries
@param protocolManager the protocol manager
@param transactionPool the transaction pool
@param miningCoordinator the mining coordinator
@param syncState the SyncState
@param vertx the vertx instance
@param clientVersion the client version
@param genesisConfigOptions the genesis config options
@param p2PNetwork the p2p network
ethereum/ethstats/src/main/java/org/hyperledger/besu/ethstats/EthStatsService.java