drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java
public void setProxyServerUrl(URL proxyServerUrl) {
        endRequest();
        if (proxyServerUrl == null && this.proxyServerUrl == null)
            return;
        boolean closeConnection = true;

        if (proxyServerUrl != null && this.proxyServerUrl != null) {
            URL oldProxyServerUrl = null;
            URL newProxyServerUrl = null;

            try {
                oldProxyServerUrl = new URL(this.proxyServerUrl.getProtocol(), this.proxyServerUrl.getHost(), this.proxyServerUrl.getPort(), "/"); //$NON-NLS-1$
                newProxyServerUrl = new URL(proxyServerUrl.getProtocol(), proxyServerUrl.getHost(), proxyServerUrl.getPort(), "/"); //$NON-NLS-1$
            } catch (MalformedURLException e) {
                // ignore or log?
            }

            if (oldProxyServerUrl.equals(newProxyServerUrl)) {
                closeConnection = false;
            }
        }

        if (closeConnection) {
            try {
                close();
            } catch (IOException e) {
                // ignore or log?
            }
        }

        this.proxyServerUrl = proxyServerUrl;
    }
public void setProxyServerUrl(URL proxyServerUrl) {
        endRequest();
        if (proxyServerUrl == null && this.proxyServerUrl == null)
            return;
        boolean closeConnection = true;

        if (proxyServerUrl != null && this.proxyServerUrl != null) {
            URL oldProxyServerUrl = null;
            URL newProxyServerUrl = null;

            try {
                oldProxyServerUrl = new URL(this.proxyServerUrl.getProtocol(), this.proxyServerUrl.getHost(), this.proxyServerUrl.getPort(), "/"); //$NON-NLS-1$
                newProxyServerUrl = new URL(proxyServerUrl.getProtocol(), proxyServerUrl.getHost(), proxyServerUrl.getPort(), "/"); //$NON-NLS-1$
            } catch (MalformedURLException e) {
                // ignore or log?
            }

            if (oldProxyServerUrl.equals(newProxyServerUrl)) {
                closeConnection = false;
            }
        }

        if (closeConnection) {
            try {
                close();
            } catch (IOException e) {
                // ignore or log?
            }
        }

        this.proxyServerUrl = proxyServerUrl;
    }
public void setProxyServerUrl ( URL proxyServerUrl ) { endRequest ( ) ; if ( proxyServerUrl == null && this . proxyServerUrl == null ) return ; boolean closeConnection = true ; if ( proxyServerUrl != null && this . proxyServerUrl != null ) { URL oldProxyServerUrl = null ; URL newProxyServerUrl = null ; try { oldProxyServerUrl = new URL ( this . proxyServerUrl . getProtocol ( ) , this . proxyServerUrl . getHost ( ) , this . proxyServerUrl . getPort ( ) , "/" ) ; //$NON-NLS-1$ newProxyServerUrl = new URL ( proxyServerUrl . getProtocol ( ) , proxyServerUrl . getHost ( ) , proxyServerUrl . getPort ( ) , "/" ) ; //$NON-NLS-1$ } catch ( MalformedURLException e ) { // ignore or log? } if ( oldProxyServerUrl . equals ( newProxyServerUrl ) ) { closeConnection = false ; } } if ( closeConnection ) { try { close ( ) ; } catch ( IOException e ) { // ignore or log? } } this . proxyServerUrl = proxyServerUrl ; }
Sets the <code>URL</code> of the proxy server this connection uses to
communicate with the origin server. If <code>null</code> is given, no
proxy server is used.

@param proxyServerUrl the <code>URL</code> of a proxy server
@see #getProxyServerUrl()
Sets the <code > URL< / code > of the proxy server this connection uses to communicate with the origin server . If <code > null< / code > is given no proxy server is used .