Example usage for org.apache.commons.httpclient HttpState clearProxyCredentials

List of usage examples for org.apache.commons.httpclient HttpState clearProxyCredentials

Introduction

In this page you can find the example usage for org.apache.commons.httpclient HttpState clearProxyCredentials.

Prototype

public void clearProxyCredentials() 

Source Link

Usage

From source file:org.exist.xquery.modules.httpclient.ClearFunction.java

public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
    if (isCalledAs("clear-all")) {
        context.setXQueryContextVar(HTTP_MODULE_PERSISTENT_STATE, null);
    } else {// w  ww  .  j a  v  a  2 s.co m
        HttpState state = (HttpState) context.getXQueryContextVar(HTTP_MODULE_PERSISTENT_STATE);

        if (state != null) {
            if (isCalledAs("clear-persistent-cookies")) {
                state.clearCookies();
            } else if (isCalledAs("clear-persistent-credentials")) {
                state.clearCredentials();
            } else if (isCalledAs("clear-persistent-proxy-credentials")) {
                state.clearProxyCredentials();
            }
        }
    }

    return (Sequence.EMPTY_SEQUENCE);
}