public void setProxy(Proxy proxy)
    {
        if(proxy != null)
        {
            java.net.Proxy p = new java.net.Proxy(java.net.Proxy.Type.HTTP,
                    new InetSocketAddress(proxy.getHost(), proxy.getPort()));
            client.setProxy(p);
        }
        else
            client.setProxy(java.net.Proxy.NO_PROXY);
    }
public void setProxy ( Proxy proxy ) { if ( proxy != null ) { java . net . Proxy p = new java . net . Proxy ( java . net . Proxy . Type . HTTP , new InetSocketAddress ( proxy . getHost ( ) , proxy . getPort ( ) ) ) ; client . setProxy ( p ) ; } else client . setProxy ( java . net . Proxy . NO_PROXY ) ; }
Set the proxy configuration to use for this client.
@param proxy The proxy configuration