public class JsonSinWaveServlet
extends javax.servlet.http.HttpServlet
Modifier and Type | Field and Description |
---|---|
protected long |
curTime
The cur time.
|
protected org.apache.log4j.Logger |
logger
The logger.
|
private static long |
serialVersionUID
The Constant serialVersionUID.
|
Constructor and Description |
---|
JsonSinWaveServlet()
Instantiates a new json sin wave servlet.
|
Modifier and Type | Method and Description |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
Do get.
|
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
Do post.
|
static void |
main(java.lang.String[] args)
The main method.
|
void |
publishHTML(java.io.PrintWriter out,
int numSamples,
double freqScalar,
double ampScalar)
Publish html.
|
void |
publishJSON(java.io.PrintWriter out,
int numSamples,
double freqScalar,
double ampScalar)
Publish json.
|
void |
publishXML(java.io.PrintWriter out,
int numSamples,
double freqScalar,
double ampScalar)
Publish xml.
|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
private static final long serialVersionUID
protected org.apache.log4j.Logger logger
protected long curTime
public JsonSinWaveServlet()
public void publishHTML(java.io.PrintWriter out, int numSamples, double freqScalar, double ampScalar)
out
- the outnumSamples
- the num samplesfreqScalar
- the freq scalarampScalar
- the amp scalarpublic void publishXML(java.io.PrintWriter out, int numSamples, double freqScalar, double ampScalar)
out
- the outnumSamples
- the num samplesfreqScalar
- the freq scalarampScalar
- the amp scalarpublic void publishJSON(java.io.PrintWriter out, int numSamples, double freqScalar, double ampScalar)
out
- the outnumSamples
- the num samplesfreqScalar
- the freq scalarampScalar
- the amp scalarpublic void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp)
doGet
in class javax.servlet.http.HttpServlet
req
- the reqrsp
- the rsppublic void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp) throws javax.servlet.ServletException
doPost
in class javax.servlet.http.HttpServlet
req
- the reqrsp
- the rspjavax.servlet.ServletException
- the servlet exceptionpublic static void main(java.lang.String[] args)
args
- the arguments