com.caucho.servlets
Class FastCGIServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by com.caucho.servlets.FastCGIServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig

public class FastCGIServlet
extends GenericServlet

Load balancing.

 <servlet-mapping url-pattern='/remote/*'>
   <servlet-name>com.caucho.server.http.FastCGIServlet</servlet-name>
   <init-param server-address='localhost:8086'/>
 </servlet-mapping>
 

See Also:
Serialized Form

Field Summary
protected  QDate _calendar
           
protected static java.util.logging.Logger log
           
 
Constructor Summary
FastCGIServlet()
           
 
Method Summary
 void addAddress(java.lang.String address)
          Sets the host address.
 void destroy()
          Called when the servlet (and the application) shuts down.
 void init()
          Initialize the servlet with the server's sruns.
 void init(WebApp webApp)
          Initialize the servlet with the server's sruns.
 void service(ServletRequest request, ServletResponse response)
          Handle the request.
 void setFailRecoverTime(Period period)
          Sets the fail recover time.
 void setKeepaliveTimeout(Period period)
          Sets the keepalive timeout.
 void setMaxKeepalive(int max)
          Sets the keepalive max.
 void setReadTimeout(Period timeout)
          Sets the socket timeout.
 void setServerAddress(java.lang.String address)
           
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log

_calendar

protected QDate _calendar
Constructor Detail

FastCGIServlet

public FastCGIServlet()
Method Detail

addAddress

public void addAddress(java.lang.String address)
Sets the host address.


setServerAddress

public void setServerAddress(java.lang.String address)

setFailRecoverTime

public void setFailRecoverTime(Period period)
Sets the fail recover time.


setMaxKeepalive

public void setMaxKeepalive(int max)
Sets the keepalive max.


setKeepaliveTimeout

public void setKeepaliveTimeout(Period period)
Sets the keepalive timeout.


setReadTimeout

public void setReadTimeout(Period timeout)
Sets the socket timeout.


init

public void init(WebApp webApp)
          throws ServletException
Initialize the servlet with the server's sruns.

Throws:
ServletException

init

public void init()
          throws ServletException
Initialize the servlet with the server's sruns.

Overrides:
init in class GenericServlet
Throws:
ServletException

service

public void service(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    java.io.IOException
Handle the request.

Parameters:
request - request information. Normally servlets will cast this to HttpServletRequest
response - response information. Normally servlets will cast this to HttpServletRequest
Throws:
ServletException
java.io.IOException

destroy

public void destroy()
Description copied from class: GenericServlet
Called when the servlet (and the application) shuts down.

Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet