| 1 | package com.github.markusbernhardt.proxy; |
| 2 | |
| 3 | import java.net.ProxySelector; |
| 4 | |
| 5 | import com.github.markusbernhardt.proxy.util.ProxyException; |
| 6 | |
| 7 | /***************************************************************************** |
| 8 | * Interface for a proxy search strategy. |
| 9 | * |
| 10 | * @author Markus Bernhardt, Copyright 2016 |
| 11 | * @author Bernd Rosstauscher, Copyright 2009 |
| 12 | ****************************************************************************/ |
| 13 | |
| 14 | public interface ProxySearchStrategy { |
| 15 | |
| 16 | /************************************************************************* |
| 17 | * Gets the a ProxySelector found by applying the search strategy. |
| 18 | * |
| 19 | * @return a ProxySelector, null if none is found. |
| 20 | * @throws ProxyException |
| 21 | * on error |
| 22 | ************************************************************************/ |
| 23 | |
| 24 | public ProxySelector getProxySelector() throws ProxyException; |
| 25 | |
| 26 | /************************************************************************* |
| 27 | * Gets the printable name of the search strategy. |
| 28 | * |
| 29 | * @return the printable name of the search strategy |
| 30 | ************************************************************************/ |
| 31 | |
| 32 | public String getName(); |
| 33 | } |