01: /*
02: * UseProxy.java
03: *
04: * Brazil project web application Framework,
05: * export version: 1.1
06: * Copyright (c) 1999-2000 Sun Microsystems, Inc.
07: *
08: * Sun Public License Notice
09: *
10: * The contents of this file are subject to the Sun Public License Version
11: * 1.0 (the "License"). You may not use this file except in compliance with
12: * the License. A copy of the License is included as the file "license.terms",
13: * and also available at http://www.sun.com/
14: *
15: * The Original Code is from:
16: * Brazil project web application Framework release 1.1.
17: * The Initial Developer of the Original Code is: cstevens.
18: * Portions created by cstevens are Copyright (C) Sun Microsystems, Inc.
19: * All Rights Reserved.
20: *
21: * Contributor(s): cstevens, suhler.
22: *
23: * Version: 1.4
24: * Created by cstevens on 99/09/29
25: * Last modified by suhler on 00/05/22 14:06:11
26: */
27:
28: package sunlabs.brazil.proxy;
29:
30: /**
31: * This interface is used by the {@link ProxyHandler} class to
32: * decide whether to issue an HTTP request directly to the
33: * specified host, or to issue the request via an HTTP proxy.
34: *
35: * @author Colin Stevens (colin.stevens@sun.com)
36: * @version 1.4, 00/05/22
37: */
38: public interface UseProxy {
39: /**
40: * Determines if the user can issue a direct or proxy request to the
41: * specified host and port.
42: * <p>
43: * The actual HTTP proxy to use is specified external to this routine by
44: * some other mechanism.
45: *
46: * @param host
47: * The host name.
48: *
49: * @param port
50: * The port number.
51: *
52: * @return <code>true</code> if the user should send the HTTP request
53: * via an HTTP proxy, <code>false</code> if the user can
54: * send the HTTP request directly to the specified named host.
55: */
56: public boolean useProxy(String host, int port);
57: }
|