Java Code Examples for com.microsoft.azure.storage.OperationContext#setProxy()

The following examples show how to use com.microsoft.azure.storage.OperationContext#setProxy() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpUtil.java    From snowflake-jdbc with Apache License 2.0 5 votes vote down vote up
public static void setProxyForAzure(OperationContext opContext)
{
  if (useProxy)
  {
    // currently, only host and port are supported. Username and password are not supported.
    Proxy azProxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort));
    opContext.setProxy(azProxy);
  }
}
 
Example 2
Source File: AzureStorageUtils.java    From nifi with Apache License 2.0 4 votes vote down vote up
public static void setProxy(final OperationContext operationContext, final ProcessContext processContext) {
    final ProxyConfiguration proxyConfig = ProxyConfiguration.getConfiguration(processContext);
    operationContext.setProxy(proxyConfig.createProxy());
}
 
Example 3
Source File: AzureStorageService.java    From crate with Apache License 2.0 4 votes vote down vote up
protected OperationContext buildOperationContext(AzureStorageSettings azureStorageSettings) {
    final OperationContext context = new OperationContext();
    context.setProxy(azureStorageSettings.getProxy());
    return context;
}