|
Tynamo™-TINI v1.0.4 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.qindesign.servlet.example.SimpleOneWireServlet
public class SimpleOneWireServlet
Simple servlet that reads from a 1-Wire sensor. This assumes the adapter and device address are known.
| Constructor Summary | |
|---|---|
SimpleOneWireServlet()
|
|
| Method Summary | |
|---|---|
protected void |
doGet(HttpServletRequest req,
HttpServletResponse resp)
Process a GET request. |
protected Object |
getValue(DSPortAdapter a,
OneWireContainer c,
HttpServletRequest req,
HttpServletResponse resp)
Retrieves a value from the given container. |
protected void |
printMessage(HttpServletResponse resp,
Object msg)
Prints the output message. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doOptions, doPost, 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleOneWireServlet()
| Method Detail |
|---|
protected void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,
IOException
doGet in class HttpServletServletException
IOException
protected void printMessage(HttpServletResponse resp,
Object msg)
throws IOException
resp - the HTTP response objectmsg - an object containing the message
IOException
protected Object getValue(DSPortAdapter a,
OneWireContainer c,
HttpServletRequest req,
HttpServletResponse resp)
throws OneWireIOException,
OneWireException
a - the port adapter, for exclusive calls, etc.c - the 1-Wire container objectreq - the HTTP request object, for extracting request parameters,
etc.resp - the HTTP response object, for setting the status, if needed,
etc.
OneWireIOException
OneWireException
|
Tynamo™-TINI v1.0.4 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||