Tynamo™-SNAP
v1.0.4

com.qindesign.servlet.example
Class OneWireSensorInclude

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.qindesign.servlet.example.OneWireSensorInclude
All Implemented Interfaces:
Servlet, ServletConfig
Direct Known Subclasses:
ADInclude, FamilyCode20Include, PotentiometerInclude, SwitchInclude, TemperatureInclude

public abstract class OneWireSensorInclude
extends HttpServlet

The purpose of this class is to provide a base-point for handling specific 1-Wire containers that extend from OneWireSensor. This does a few basic things:

This is designed to work with the OneWireServlet example.

Version:
1.0.4
Author:
Shawn Silverman
See Also:
OneWireServlet

Constructor Summary
OneWireSensorInclude()
           
 
Method Summary
protected abstract  void doContainerGet(OneWireContainer c, HttpServletRequest req, HttpServletResponse resp, ServletOutputStream out)
          Performs the include just after printing the header.
protected  void doGet(HttpServletRequest req, HttpServletResponse resp)
          Processes a GET request.
protected  void doPost(HttpServletRequest req, HttpServletResponse resp)
          Processes a POST request.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneWireSensorInclude

public OneWireSensorInclude()
Method Detail

doPost

protected final void doPost(HttpServletRequest req,
                            HttpServletResponse resp)
                     throws ServletException,
                            IOException
Processes a POST request. This calls doGet.

Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

doGet

protected final void doGet(HttpServletRequest req,
                           HttpServletResponse resp)
                    throws ServletException,
                           IOException
Processes a GET request. Subclasses need to implement the doContainerGet method to process a request.

Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException
See Also:
doContainerGet(OneWireContainer, HttpServletRequest, HttpServletResponse, ServletOutputStream)

doContainerGet

protected abstract void doContainerGet(OneWireContainer c,
                                       HttpServletRequest req,
                                       HttpServletResponse resp,
                                       ServletOutputStream out)
                                throws IOException,
                                       OneWireException
Performs the include just after printing the header. This is the method that subclasses need to implement in order to processes a request.

Throws:
IOException
OneWireException

Tynamo™-SNAP
v1.0.4

© 2001-2007 Shawn Silverman