ProgramixGenericLib v5.0.1

com.programix.da2.bridge.http
Class DABridgeServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.programix.da2.bridge.http.DABridgeServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public abstract class DABridgeServlet
extends HttpServlet

This is the servlet half of the HTTP bridge (see HttpDABridgeProcessor). This servlet does not enforce any security or session tracking and passes along all requests to the DABridgeProcessor specified during initialization (that processor is in charge of any security policies). Subclasses must implement the setup() method and in this method, they must call setProcessor(com.programix.da2.bridge.DABridgeProcessor).

Author:
Paul Hyde
See Also:
Serialized Form

Constructor Summary
DABridgeServlet()
           
 
Method Summary
 void destroy()
           
protected  void doGet(HttpServletRequest req, HttpServletResponse res)
           
protected  void doPost(HttpServletRequest req, HttpServletResponse res)
           
 int getCompressionThreshold()
           
 String getContentType()
           
 int getPostCount()
           
 DABridgeProcessor getProcessor()
           
 void init()
           
 void setCompressionThreshold(int compressionThreshold)
           
 void setContentType(String contentType)
           
 void setProcessor(DABridgeProcessor processor)
           
protected abstract  void setup()
          Subclasses must implement this method to setup the DABridgeProcessor that will be used to service client requests.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DABridgeServlet

public DABridgeServlet()
Method Detail

init

public final void init()
                throws ServletException
Overrides:
init in class GenericServlet
Throws:
ServletException

destroy

public final void destroy()
Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet

setup

protected abstract void setup()
                       throws DAException
Subclasses must implement this method to setup the DABridgeProcessor that will be used to service client requests. Subclasses must call setProcessor(DABridgeProcessor).

Throws:
DAException - if there is some reason that this servlet should not be put into service.

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

getPostCount

public int getPostCount()

getContentType

public String getContentType()

setContentType

public void setContentType(String contentType)

getCompressionThreshold

public int getCompressionThreshold()

setCompressionThreshold

public void setCompressionThreshold(int compressionThreshold)

getProcessor

public DABridgeProcessor getProcessor()

setProcessor

public void setProcessor(DABridgeProcessor processor)

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.