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

com.qcloud.cos.endpoint.UserSpecifiedEndpointBuilder Maven / Gradle / Ivy

There is a newer version: 5.6.238.2
Show newest version
package com.qcloud.cos.endpoint;

/**
 * user specified endpoint builder
 *
 */
public class UserSpecifiedEndpointBuilder implements EndpointBuilder {

    private String generalApiEndpoint;
    private String getServiceApiEndpoint;
    
    public UserSpecifiedEndpointBuilder(String generalApiEndpoint, String getServiceApiEndpoint) {
        super();
        if (this.generalApiEndpoint == null || getServiceApiEndpoint == null) {
            throw new IllegalArgumentException("endpoint must not be null");
        }
        this.generalApiEndpoint = generalApiEndpoint;
        this.getServiceApiEndpoint = getServiceApiEndpoint;
    }

    @Override
    public String buildGeneralApiEndpoint(String bucketName) {
        return generalApiEndpoint;
    }

    @Override
    public String buildGetServiceApiEndpoint() {
        return getServiceApiEndpoint;
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy