org.jboss.web.loadbalancer
Class LoadbalancerServlet

java.lang.Object
  extended byHttpServlet
      extended byorg.jboss.web.loadbalancer.LoadbalancerServlet

public class LoadbalancerServlet
extends HttpServlet

A servlet that does the job of a reverse proxy.

See Also:
Serialized Form

Field Summary
protected  LoadbalancerServiceMBean loadbalancer
           
protected  java.lang.String loadbalancerName
           
protected static Logger (src) log
           
 
Constructor Summary
LoadbalancerServlet()
           
 
Method Summary
 void destroy()
           
protected  void doDelete(HttpServletRequest request, HttpServletResponse response)
           
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
           
protected  void doHead(HttpServletRequest request, HttpServletResponse response)
           
protected  void doOptions(HttpServletRequest request, HttpServletResponse response)
           
protected  void doPost(HttpServletRequest request, HttpServletResponse response)
           
protected  void doPut(HttpServletRequest request, HttpServletResponse response)
           
protected  void handleRequest(HttpServletRequest request, HttpServletResponse response, int requestMethod)
          Handle the request for all request methods.
 void init(ServletConfig config)
           
protected  void initLoadbalancerDelegate()
          Create a proxy to the loadbalancer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger (src)  log

loadbalancerName

protected java.lang.String loadbalancerName

loadbalancer

protected LoadbalancerServiceMBean loadbalancer
Constructor Detail

LoadbalancerServlet

public LoadbalancerServlet()
Method Detail

handleRequest

protected void handleRequest(HttpServletRequest request,
                             HttpServletResponse response,
                             int requestMethod)
                      throws ServletException,
                             java.io.IOException
Handle the request for all request methods.

Parameters:
request -
response -
requestMethod -
Throws:
ServletException
java.io.IOException

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     java.io.IOException
Throws:
ServletException
java.io.IOException

doPost

protected void doPost(HttpServletRequest request,
                      HttpServletResponse response)
               throws ServletException,
                      java.io.IOException
Throws:
ServletException
java.io.IOException

doDelete

protected void doDelete(HttpServletRequest request,
                        HttpServletResponse response)
                 throws ServletException,
                        java.io.IOException
Throws:
ServletException
java.io.IOException

doHead

protected void doHead(HttpServletRequest request,
                      HttpServletResponse response)
               throws ServletException,
                      java.io.IOException
Throws:
ServletException
java.io.IOException

doOptions

protected void doOptions(HttpServletRequest request,
                         HttpServletResponse response)
                  throws ServletException,
                         java.io.IOException
Throws:
ServletException
java.io.IOException

doPut

protected void doPut(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     java.io.IOException
Throws:
ServletException
java.io.IOException

init

public void init(ServletConfig config)
          throws ServletException
Throws:
ServletException

destroy

public void destroy()

initLoadbalancerDelegate

protected void initLoadbalancerDelegate()
Create a proxy to the loadbalancer