1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity.util;
17
18 import javax.servlet.ServletRequest;
19
20
21 /***
22 * A <code>PortResolver</code> determines the port a web request was received
23 * on.
24 *
25 * <P>
26 * This interface is necessary because
27 * <code>ServletRequest.getServerPort()</code> may not return the correct port
28 * in certain circumstances. For example, if the browser does not construct
29 * the URL correctly after a redirect.
30 * </p>
31 *
32 * @author Ben Alex
33 * @version $Id: PortResolver.java,v 1.2 2005/11/17 00:56:09 benalex Exp $
34 */
35 public interface PortResolver {
36
37
38 /***
39 * Indicates the port the <code>ServletRequest</code> was received on.
40 *
41 * @param request that the method should lookup the port for
42 *
43 * @return the port the request was received on
44 */
45 public int getServerPort(ServletRequest request);
46 }