org.mortbay.http.handler

Class CollettaProxyHandler

public class CollettaProxyHandler extends ProxyHandler

Method Summary
protected booleanisForbidden(URI uri)
Is URL Forbidden.
protected booleanisForbidden(String scheme, String host, int port, boolean openNonPrivPorts)
Is scheme,host & port Forbidden.
protected URLisProxied(URI uri)
Is URL Proxied.

Method Detail

isForbidden

protected boolean isForbidden(URI uri)
Is URL Forbidden.

Returns: True if the URL is not forbidden. Calls isForbidden(scheme,host,port,true);

isForbidden

protected boolean isForbidden(String scheme, String host, int port, boolean openNonPrivPorts)
Is scheme,host & port Forbidden.

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.

isProxied

protected URL isProxied(URI uri)
Is URL Proxied. Method to allow derived handlers to select which URIs are proxied and to where.

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.

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.