resolver.java

来自「一款Java实现的HTTP代理服务器」· Java 代码 · 共 34 行

JAVA
34
字号
package rabbit.io;import java.net.InetAddress;import java.net.URL;/** An interface to handle name lookups.  * * @author <a href="mailto:robo@khelekore.org">Robert Olofsson</a> */public interface Resolver {    /** Get the InetAddress for a given url.      *  Normally the InetAddress of the url host, but      *  might be the InetAddress of the chained proxy to use.     * @param url the URL to lookup.     * @param listener the InetAddressListener to notify when lookup is done.     */    void getInetAddress (URL url, InetAddressListener listener);        /** Get the port to use for connecting to a given port.     *  Normally port is returned, but if there is a chained proxy,      *  then the proxy port is returned instead.     */    int getConnectPort (int port);     /** Check if the resolver is using a proxy or not.      */    boolean isProxyConnected ();    /** Get the currently set proxy authentication.      */    String getProxyAuthString ();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?