public class PowerPlotResource extends VZResource
| Modifier and Type | Field and Description |
|---|---|
static String[] |
DEFAULT_PATTERNS |
protected static Logger |
LOGGER |
static String |
PATTERN_ASCTIME
Date format pattern used to parse HTTP date headers in ANSI C
asctime() format. |
static String |
PATTERN_RFC1036
Date format pattern used to parse HTTP date headers in RFC 1036 format.
|
static String |
PATTERN_RFC1123
Date format pattern used to parse HTTP date headers in RFC 1123 format.
|
| Constructor and Description |
|---|
PowerPlotResource()
Power Plot Resource constructor
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
getPlotFileForRange(String modified,
int width,
int height,
String channelNos,
String isoFrom,
String isoTo) |
javax.ws.rs.core.Response |
getPlotFileForRange(String modified,
String filename) |
javax.ws.rs.core.Response |
getPlotForRange(int width,
int height,
String channelNos,
String isoFrom,
String isoTo) |
static javax.ws.rs.core.Response |
returnFile(File file,
String modified)
http://stackoverflow.com/a/10257341/1497139
Sends the file if modified and "not modified" if not modified
future work may put each file with a unique id in a separate folder in
tomcat
* use that static URL for each file
* if file is modified, URL of file changes
* -> client always fetches correct file
method header for calling method public Response
getXY(@HeaderParam("If-Modified-Since") String modified) {
|
prepareMap, prepareRootMapgetElementName, getManager, getTemplate, setElementName, setManager, setTemplateprotected static Logger LOGGER
public static final String PATTERN_RFC1123
public static final String PATTERN_RFC1036
public static final String PATTERN_ASCTIME
asctime() format.public static final String[] DEFAULT_PATTERNS
public javax.ws.rs.core.Response getPlotFileForRange(@HeaderParam(value="If-Modified-Since")
String modified,
int width,
int height,
String channelNos,
String isoFrom,
String isoTo)
throws Exception
Exceptionpublic javax.ws.rs.core.Response getPlotFileForRange(@HeaderParam(value="If-Modified-Since")
String modified,
String filename)
throws Exception
Exceptionpublic javax.ws.rs.core.Response getPlotForRange(int width,
int height,
String channelNos,
String isoFrom,
String isoTo)
throws Exception
Exceptionpublic static javax.ws.rs.core.Response returnFile(File file, String modified)
file - to sendmodified - - HeaderField "If-Modified-Since" - may be "null"Copyright © 2018 BITPlan GmbH. All rights reserved.