public abstract class AbstractHttpCommand extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
arguments |
protected String |
cmd |
protected Data |
data |
protected DecimalFormat |
decimalFormat |
protected static String |
DEFAULT_TZ |
protected static String |
DISPLAY_DATE_FORMAT |
protected WaveServerEmulator |
emulator |
protected static String |
INPUT_DATE_FORMAT |
protected int |
maxDays |
protected gov.usgs.net.NetTools |
netTools |
protected static int |
ONE_DAY |
protected static int |
ONE_HOUR |
protected static int |
ONE_MINUTE |
protected gov.usgs.net.HttpRequest |
request |
protected SocketChannel |
socketChannel |
protected WinstonDatabase |
winston |
protected WWS |
wws |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpCommand(gov.usgs.net.NetTools nt,
WinstonDatabase db,
WWS wws)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
boolToInt(boolean in)
Convert a boolean value to an integer as passed in arguments.
|
abstract String |
getCommand()
Command as a http file
|
protected Double |
getEndTime(String t2)
parse end time
|
protected Double |
getEndTime(String t2,
TimeZone tz)
convert back to UTC
|
protected Double |
getStartTime(String t1,
Double endTime,
long mult) |
protected Double |
getStartTime(String t1,
Double endTime,
long mult,
TimeZone tz) |
void |
respond(String cmd,
SocketChannel c,
gov.usgs.net.HttpRequest request)
Initiate response.
|
protected abstract void |
sendResponse()
Do the work.
|
protected double |
timeOrMaxDays(double t)
Apply maxDays to time
|
void |
writeSimpleHTML(String msg)
Return a string as a HTML page
|
void |
writeSimpleText(String msg)
Return a string as a Text page
|
protected static final String INPUT_DATE_FORMAT
protected static final String DISPLAY_DATE_FORMAT
protected static final int ONE_MINUTE
protected static final int ONE_HOUR
protected static final int ONE_DAY
protected static final String DEFAULT_TZ
protected SocketChannel socketChannel
protected gov.usgs.net.NetTools netTools
protected WinstonDatabase winston
protected WWS wws
protected Data data
protected WaveServerEmulator emulator
protected int maxDays
protected gov.usgs.net.HttpRequest request
protected String cmd
protected DecimalFormat decimalFormat
protected AbstractHttpCommand(gov.usgs.net.NetTools nt,
WinstonDatabase db,
WWS wws)
nt - db - wws - public abstract String getCommand()
protected abstract void sendResponse()
public void respond(String cmd, SocketChannel c, gov.usgs.net.HttpRequest request)
cmd - c - request - public void writeSimpleHTML(String msg)
msg - public void writeSimpleText(String msg)
msg - protected Double getStartTime(String t1, Double endTime, long mult)
t1 - start time StringendTime - end timemult - number of seconds per interval used for relative times. 60 for
minutes, 60*60 for hours, 60*60*24 for daysParseExceptionprotected double timeOrMaxDays(double t)
t - timeprotected int boolToInt(boolean in)
in - Copyright © 2017. All rights reserved.