All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyuncs.http.IHttpClient Maven / Gradle / Ivy

Go to download

Aliyun Open API SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com

There is a newer version: 4.7.3
Show newest version
package com.aliyuncs.http;

import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.Future;

import com.aliyuncs.exceptions.ClientException;

/**
 * @author VK.Gao
 * @date 2018/03/28
 */
public abstract class IHttpClient implements Closeable {

    protected boolean ignoreHttpsCert = false;

    public IHttpClient(HttpClientConfig clientConfig) throws ClientException {
        if (clientConfig == null) {
            clientConfig = HttpClientConfig.getDefault();
        }
        init(clientConfig);
    }

    protected abstract void init(HttpClientConfig clientConfig) throws ClientException;

    public abstract HttpResponse syncInvoke(HttpRequest apiRequest) throws IOException;

    public abstract Future asyncInvoke(final HttpRequest apiRequest, final CallBack callback) throws IOException;

    public abstract void ignoreSSLCertificate();

    public abstract void restoreSSLCertificate();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy