public class DapRequest extends Object
Modified by Heimbigner for DAP4.
| Modifier and Type | Field and Description |
|---|---|
protected dap4.core.data.ChecksumMode |
checksummode |
static String |
CONSTRAINTTAG |
protected DapController |
controller |
protected String |
controllerpath |
protected String |
datasetpath |
static dap4.core.data.ChecksumMode |
DEFAULTCSUM |
protected dap4.core.util.ResponseFormat |
format |
protected dap4.dap4lib.RequestMode |
mode |
protected ByteOrder |
order |
protected Map<String,String> |
queries |
protected String |
querystring |
protected javax.servlet.http.HttpServletRequest |
request |
static String |
RESOURCEDIRNAME |
protected String |
resourceroot |
protected javax.servlet.http.HttpServletResponse |
response |
protected String |
server |
protected javax.servlet.ServletContext |
servletcontext |
protected String |
url |
static String |
WEBINFPATH |
| Constructor and Description |
|---|
DapRequest(DapController controller,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
dap4.core.data.ChecksumMode |
getChecksumMode() |
String |
getControllerPath() |
String |
getDataset() |
String |
getDatasetPath() |
dap4.core.util.ResponseFormat |
getFormat() |
dap4.dap4lib.RequestMode |
getMode() |
ByteOrder |
getOrder() |
String |
getOriginalURL() |
OutputStream |
getOutputStream() |
Map<String,String> |
getQueries() |
javax.servlet.http.HttpServletRequest |
getRequest() |
String |
getResourcePath(String relpath) |
String |
getResourceRoot() |
javax.servlet.http.HttpServletResponse |
getResponse() |
String |
getServer() |
javax.servlet.ServletContext |
getServletContext() |
String |
getURL() |
String |
getURLPath() |
protected void |
parse()
The goal of parse() is to extract info
from the underlying HttpRequest and cache it
in this object.
|
String |
queryLookup(String name) |
void |
setResponseHeader(String name,
String value)
Set a request header
|
public static final String WEBINFPATH
public static final String RESOURCEDIRNAME
public static final String CONSTRAINTTAG
public static final dap4.core.data.ChecksumMode DEFAULTCSUM
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
protected String url
protected String querystring
protected String server
protected String controllerpath
protected String datasetpath
protected dap4.dap4lib.RequestMode mode
protected dap4.core.util.ResponseFormat format
protected DapController controller
protected ByteOrder order
protected dap4.core.data.ChecksumMode checksummode
protected String resourceroot
protected javax.servlet.ServletContext servletcontext
public DapRequest(DapController controller, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected void parse()
throws IOException
In particular, the incoming URL needs to be decomposed
into multiple pieces. Certain assumptions are made:
1. every incoming url is of the form
(a) http(s)://host:port/d4ts/
or
(b) http(s)://host:port/d4ts/
IOExceptionpublic ByteOrder getOrder()
public String getResourceRoot()
public dap4.core.data.ChecksumMode getChecksumMode()
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public OutputStream getOutputStream() throws IOException
IOExceptionpublic String getURL()
public String getOriginalURL()
public String getDataset()
public String getServer()
public javax.servlet.ServletContext getServletContext()
public String getControllerPath()
public String getURLPath()
public dap4.dap4lib.RequestMode getMode()
public dap4.core.util.ResponseFormat getFormat()
public void setResponseHeader(String name, String value)
name - the header namevalue - the header valuepublic String getResourcePath(String relpath) throws IOException
IOExceptionpublic String getDatasetPath()