public static void init()

in S3HtsjdkPlugin/src/main/java/com/epam/cmbi/s3/Configuration.java [103:151]


    public static void init() {
        int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);
        if (conNum > 0) {
            numberOfConnections = conNum;
        } else {
            throw new IllegalArgumentException("Negative number of connections value",
                    new IOException());
        }

        int maxPartSize = getIntProperty(MAX_CHUNK_SIZE_PARAMETER, DEFAULT_MAX_CHUNK_SIZE);
        if (maxPartSize > 0) {
            maxDownloadPartSize = maxPartSize;
        } else {
            throw new IllegalArgumentException("Negative download part size value",
                    new IOException());
        }

        int retryCount = getIntProperty(CUSTOM_RETRY_COUNT_PARAMETER, DEFAULT_CUSTOM_RETRY_COUNT);
        if (retryCount > 0) {
            customRetryCount = retryCount;
        } else {
            throw new IllegalArgumentException("Negative retry count value",
                    new IOException());
        }

        int minPartSize = getIntProperty(MIN_CHUNK_SIZE_PARAMETER, DEFAULT_MIN_CHUNK_SIZE);
        if (minPartSize > 0) {
            minDownloadPartSize = minPartSize;
        } else {
            throw new IllegalArgumentException("Negative download part size value",
                    new IOException());
        }

        if (minDownloadPartSize > maxDownloadPartSize){
            throw new IllegalArgumentException("min_download_chunk_size > max_download_chunk_size",
                    new IOException());
        }

        String url = System.getProperty(INDEX_URL_PARAMETER, "");
        if ("".equals(url)) {
            indexFileURL = Optional.empty();
        } else {
            try {
                indexFileURL = Optional.of(new URL(url));
            } catch (MalformedURLException e) {
                throw new IllegalArgumentException("Bad URL parameter received", e);
            }
        }
    }