All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.asynchttpclient.proxy.ProxyServerSelector Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.asynchttpclient.proxy;

import org.asynchttpclient.uri.Uri;

/**
 * Selector for a proxy server
 */
public interface ProxyServerSelector {

    /**
     * Select a proxy server to use for the given URI.
     *
     * @param uri The URI to select a proxy server for.
     * @return The proxy server to use, if any.  May return null.
     */
    ProxyServer select(Uri uri);

    /**
     * A selector that always selects no proxy.
     */
    ProxyServerSelector NO_PROXY_SELECTOR = new ProxyServerSelector() {
        @Override
        public ProxyServer select(Uri uri) {
            return null;
        }
    };
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy