com.caucho.servlets
Class HmuxLoadBalanceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by com.caucho.servlets.HmuxLoadBalanceServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig
Direct Known Subclasses:
LoadBalanceServlet

public class HmuxLoadBalanceServlet
extends GenericServlet

Load balancing.

 <servlet-mapping url-pattern='/remote/*'>
   <servlet-name>com.caucho.servlets.LoadBalanceServlet</servlet-name>
   <init>
      <cluster>app-tier</cluster>
   </init>
 </servlet-mapping>
 

See Also:
Serialized Form

Field Summary
protected  QDate _calendar
           
 
Constructor Summary
HmuxLoadBalanceServlet()
           
 
Method Summary
 void destroy()
          Called when the servlet (and the application) shuts down.
 void init()
          Initialize the servlet with the server's sruns.
 void service(ServletRequest request, ServletResponse response)
          Handle the request.
 void setCluster(java.lang.String id)
          Sets the cluster id
 void setEscapedUrl(boolean isEscaped)
           
 void setStickyGenerator(StickyRequestHashGenerator sticky)
           
 void setStickySessions(boolean isStickySessions)
          Set true if sticky-sessions should be enabled.
 void setStrategy(java.lang.String strategy)
          Sets the strategy.
 
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

_calendar

protected QDate _calendar
Constructor Detail

HmuxLoadBalanceServlet

public HmuxLoadBalanceServlet()
Method Detail

setStickySessions

public void setStickySessions(boolean isStickySessions)
Set true if sticky-sessions should be enabled.


setCluster

public void setCluster(java.lang.String id)
Sets the cluster id


setStrategy

public void setStrategy(java.lang.String strategy)
                 throws ConfigException
Sets the strategy.

Throws:
ConfigException

setStickyGenerator

public void setStickyGenerator(StickyRequestHashGenerator sticky)

setEscapedUrl

public void setEscapedUrl(boolean isEscaped)

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