Example usage for com.amazonaws Protocol toString

List of usage examples for com.amazonaws Protocol toString

Introduction

In this page you can find the example usage for com.amazonaws Protocol toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:org.apache.druid.storage.s3.S3StorageDruidModule.java

License:Apache License

private static Protocol determineProtocol(AWSClientConfig clientConfig, AWSEndpointConfig endpointConfig) {
    final Protocol protocolFromClientConfig = parseProtocol(clientConfig.getProtocol());
    final String endpointUrl = endpointConfig.getUrl();
    if (StringUtils.isNotEmpty(endpointUrl)) {
        //noinspection ConstantConditions
        final URI uri = URIs.parse(endpointUrl, protocolFromClientConfig.toString());
        final Protocol protocol = parseProtocol(uri.getScheme());
        if (protocol != null && (protocol != protocolFromClientConfig)) {
            log.warn("[%s] protocol will be used for endpoint [%s]", protocol, endpointUrl);
        }//from ww w.  j a v a 2 s.  co m
        return protocol;
    } else {
        return protocolFromClientConfig;
    }
}