com.caucho.rewrite
Class FastCgiProxy

java.lang.Object
  extended by com.caucho.rewrite.AbstractDispatchRule
      extended by com.caucho.rewrite.AbstractRegexpDispatchRule
          extended by com.caucho.rewrite.AbstractTargetDispatchRule
              extended by com.caucho.rewrite.FastCgiProxy
All Implemented Interfaces:
DispatchRule

@Configurable
public class FastCgiProxy
extends AbstractTargetDispatchRule

Dispatches a request to a backend server using FastCGI as the proxy protocol.

 <web-app xmlns:resin="urn:java:com.caucho.resin">

   <resin:FastCgiProxy regexp="^/remote">
     <address>127.0.0.1:8080</address>
   </resin:FastCgiProxy>

 </web-app>
 


Nested Class Summary
static class FastCgiProxy.ProxyFilterChain
           
static class FastCgiProxy.ProxyRequest
           
 
Constructor Summary
FastCgiProxy()
           
 
Method Summary
 void addAddress(java.lang.String address)
          Adds a backend FastCGI server address like "127.0.0.1:8081"
 FilterChain createDispatch(DispatcherType type, java.lang.String uri, java.lang.String queryString, java.lang.String target, FilterChain next)
           
 void init()
           
 void setFailRecoverTime(Period period)
          Sets the timeout to recover from a failed connection to the backend.
 
Methods inherited from class com.caucho.rewrite.AbstractTargetDispatchRule
getTarget, rewriteDefault, rewriteTarget, setAbsoluteTarget, setTarget, setTargetHost
 
Methods inherited from class com.caucho.rewrite.AbstractRegexpDispatchRule
add, add, add, getRegexp, isFilter, isForward, isInclude, isRequest, map, rewriteUri, setRegexp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FastCgiProxy

public FastCgiProxy()
Method Detail

addAddress

@Configurable
public void addAddress(java.lang.String address)
Adds a backend FastCGI server address like "127.0.0.1:8081"

Parameters:
address - the backend address likst "127.0.0.1:8081"

setFailRecoverTime

@Configurable
public void setFailRecoverTime(Period period)
Sets the timeout to recover from a failed connection to the backend.

Parameters:
period - the recover timeout

init

@PostConstruct
public void init()
          throws ConfigException
Overrides:
init in class AbstractTargetDispatchRule
Throws:
ConfigException

createDispatch

public FilterChain createDispatch(DispatcherType type,
                                  java.lang.String uri,
                                  java.lang.String queryString,
                                  java.lang.String target,
                                  FilterChain next)
Overrides:
createDispatch in class AbstractRegexpDispatchRule