com.mortbay.HTTP.Handler
Class ProxyHandler

java.lang.Object
  |
  +--com.mortbay.HTTP.Handler.NullHandler
        |
        +--com.mortbay.HTTP.Handler.ProxyHandler

public class ProxyHandler
extends NullHandler

Proxy HttpHandler This handler can service requests of the form:

 METHOD [http|ftp|file]:URL VERSION
 
Which are generated by browsers that are talking to a proxy. This handler can be used as a simple proxy or the basis of an advanced proxy.

Notes

The handler must be installed in a handler stack starting with "http:" or "ftp:". For a HTTP proxy, the ParamHandler should also be in the stack before the ProxyHandler, so that form content is read.


Fields inherited from class com.mortbay.HTTP.Handler.NullHandler
httpServer
 
Constructor Summary
ProxyHandler()
          Constructor.
ProxyHandler(java.util.Properties properties)
          Constructor from properties.
 
Method Summary
 void handle(HttpRequest request, HttpResponse response)
          Handle proxy requests.
 void setProperties(java.util.Properties properties)
          Configure from properties.
 
Methods inherited from class com.mortbay.HTTP.Handler.NullHandler
destroy, getProperties, servlet, servletNames, setServer, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyHandler

public ProxyHandler(java.util.Properties properties)
Constructor from properties. Calls setProperties.
Parameters:
properties - Configuration properties

ProxyHandler

public ProxyHandler()
Constructor.
Method Detail

setProperties

public void setProperties(java.util.Properties properties)
Configure from properties. No configuration parameters for this handler
Overrides:
setProperties in class NullHandler
Parameters:
properties - configuration.

handle

public void handle(HttpRequest request,
                   HttpResponse response)
            throws java.io.IOException
Handle proxy requests.
Overrides:
handle in class NullHandler
Tags copied from interface: HttpHandler
Parameters:
request - The HTTP requests to be handled
response - The HTTP response to be used.