org.openqa.jetty.http.handler
Class CollettaProxyHandler
java.lang.Object
   org.openqa.jetty.http.handler.AbstractHttpHandler
org.openqa.jetty.http.handler.AbstractHttpHandler
       org.openqa.jetty.http.handler.ProxyHandler
org.openqa.jetty.http.handler.ProxyHandler
           org.openqa.jetty.http.handler.CollettaProxyHandler
org.openqa.jetty.http.handler.CollettaProxyHandler
- All Implemented Interfaces: 
- java.io.Serializable, HttpHandler, LifeCycle
- public class CollettaProxyHandler 
- extends ProxyHandler
- See Also:
- Serialized Form
 
 
 
| Method Summary | 
| protected  boolean | isForbidden(java.lang.String scheme,
            java.lang.String host,
            int port,
            boolean openNonPrivPorts)Is scheme,host & port Forbidden.
 | 
| protected  boolean | isForbidden(URI uri)Is URL Forbidden.
 | 
| protected  java.net.URL | isProxied(URI uri)Is URL Proxied.
 | 
 
| Methods inherited from class org.openqa.jetty.http.handler.ProxyHandler | 
| customizeConnection, customizeConnection, getProxyHostsBlackList, getProxyHostsWhiteList, getTunnelTimeoutMs, handle, handleConnect, isAnonymous, newHttpTunnel, sendForbid, setAnonymous, setProxyHostsBlackList, setProxyHostsWhiteList, setTunnelTimeoutMs, start | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
CollettaProxyHandler
public CollettaProxyHandler()
isProxied
protected java.net.URL isProxied(URI uri)
                          throws java.net.MalformedURLException
- Is URL Proxied. Method to allow derived handlers to select which URIs are proxied and to
 where.
 
- 
- Overrides:
- isProxiedin class- ProxyHandler
 
- 
- Parameters:
- uri- The requested URI, which should include a scheme, host and port.
- Returns:
- The URL to proxy to, or null if the passed URI should not be proxied. The default
         implementation returns the passed uri if isForbidden() returns true.
- Throws:
- java.net.MalformedURLException
 
isForbidden
protected boolean isForbidden(URI uri)
- Is URL Forbidden.
 
- 
- Overrides:
- isForbiddenin class- ProxyHandler
 
- 
- Returns:
- True if the URL is not forbidden. Calls isForbidden(scheme,host,port,true);
 
isForbidden
protected boolean isForbidden(java.lang.String scheme,
                              java.lang.String host,
                              int port,
                              boolean openNonPrivPorts)
- Is scheme,host & port Forbidden.
 
- 
- Overrides:
- isForbiddenin class- ProxyHandler
 
- 
- Parameters:
- scheme- A scheme that mast be in the proxySchemes StringMap.
- host- A host that must pass the white and black lists
- port- A port that must in the allowedConnectPorts Set
- openNonPrivPorts- If true ports greater than 1024 are allowed.
- Returns:
- True if the request to the scheme,host and port is not forbidden.
 
Copyright © 2011. All Rights Reserved.