Example usage for org.apache.http.auth AuthScheme getParameter

List of usage examples for org.apache.http.auth AuthScheme getParameter

Introduction

In this page you can find the example usage for org.apache.http.auth AuthScheme getParameter.

Prototype

String getParameter(final String name);

Source Link

Document

Returns authentication parameter with the given name, if available.

Usage

From source file:org.esxx.js.protocol.PreemptiveSchemes.java

public synchronized void remember(String uri_prefix, AuthScheme scheme, AuthScope scope) {
    String[] prefices = { uri_prefix };
    String domains = scheme.getParameter("domain");

    if (domains != null && !domains.isEmpty()) {
        prefices = wsPattern.split(domains);
    }//from w w  w . j a va  2s .c  o  m

    for (String prefix : prefices) {
        // Add schemes to the front of the LRU list
        if (prefix.startsWith("/")) {
            prefix = URI.create(uri_prefix).resolve(prefix).toString();
        }

        if (find(prefix) == null) {
            schemes.addFirst(new PreemptiveScheme(prefix, scheme, scope));
        }
    }

    // Trim cache
    while (schemes.size() > maxEntries) {
        schemes.removeLast();
    }
}