public abstract class DapController
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BIG_ENDIAN |
protected static DapCache |
cache |
protected static java.lang.String |
DATAEXT |
static boolean |
DEBUG |
static long |
DEFAULTBINARYWRITELIMIT |
protected static java.lang.String |
DMREXT |
protected static java.lang.String |
DSREXT |
static boolean |
DUMPDATA |
static boolean |
DUMPDMR |
protected static java.lang.String[] |
ENDINGS |
protected static java.lang.String |
FAVICON |
protected boolean |
initialized |
protected static boolean |
IS_BIG_ENDIAN |
protected static java.lang.String |
LITTLE_ENDIAN |
static boolean |
PARSEDEBUG |
static boolean |
TESTING |
| Constructor and Description |
|---|
DapController() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCommonHeaders(DapRequest drq) |
protected abstract void |
doCapabilities(DapRequest drq,
dap4.core.util.DapContext cxt)
Process a capabilities request.
|
protected void |
doData(DapRequest drq,
dap4.core.util.DapContext cxt)
Process a DataDMR request.
|
protected void |
doDMR(DapRequest drq,
dap4.core.util.DapContext cxt)
Process a DMR request.
|
protected void |
doDSR(DapRequest drq,
dap4.core.util.DapContext cxt)
Process a DSR request.
|
protected abstract void |
doFavicon(java.lang.String icopath,
dap4.core.util.DapContext cxt)
Process a favicon request.
|
abstract long |
getBinaryWriteLimit()
Get the maximum # of bytes per request
|
protected static DapCache |
getCache() |
protected DapRequest |
getRequestState(javax.servlet.http.HttpServletRequest rq,
javax.servlet.http.HttpServletResponse rsp)
Merge the servlet inputs into a single object
for easier transport as well as adding value.
|
abstract java.lang.String |
getResourcePath(DapRequest drq,
java.lang.String location)
Convert a URL path into an absolute file path
Note that it is assumed than any leading servlet prefix has been removed.
|
abstract java.lang.String |
getServletID()
Get the servlet name (with no leading or trailing slashes)
|
void |
handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
init() |
void |
initialize()
Initialize servlet/controller
|
static java.lang.String |
printDMR(dap4.core.dmr.DapDataset dmr) |
protected void |
senderror(DapRequest drq,
int httpcode,
java.lang.Throwable t)
Generate an error based on the parameters
|
protected static void |
setCache(DapCache cache) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic static boolean TESTING
public static boolean DEBUG
public static boolean DUMPDMR
public static boolean DUMPDATA
public static boolean PARSEDEBUG
protected static final java.lang.String BIG_ENDIAN
protected static final java.lang.String LITTLE_ENDIAN
protected static boolean IS_BIG_ENDIAN
protected static final java.lang.String DMREXT
protected static final java.lang.String DATAEXT
protected static final java.lang.String DSREXT
protected static final java.lang.String[] ENDINGS
protected static final java.lang.String FAVICON
public static final long DEFAULTBINARYWRITELIMIT
protected static DapCache cache
protected boolean initialized
protected static void setCache(DapCache cache)
protected static DapCache getCache()
protected abstract void doFavicon(java.lang.String icopath,
dap4.core.util.DapContext cxt)
throws java.io.IOException
icopath - The path to the iconcxt - The dap contextjava.io.IOExceptionprotected abstract void doCapabilities(DapRequest drq, dap4.core.util.DapContext cxt) throws java.io.IOException
cxt - The dapontextjava.io.IOExceptionpublic abstract java.lang.String getResourcePath(DapRequest drq, java.lang.String location) throws dap4.core.util.DapException
drq - dap requestlocation - suffix of url pathjava.io.IOExceptiondap4.core.util.DapExceptionpublic abstract long getBinaryWriteLimit()
public abstract java.lang.String getServletID()
public void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionpublic void initialize()
public void handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws java.io.IOException
java.io.IOExceptionprotected void doDSR(DapRequest drq, dap4.core.util.DapContext cxt) throws java.io.IOException
java.io.IOExceptionprotected void doDMR(DapRequest drq, dap4.core.util.DapContext cxt) throws java.io.IOException
cxt - The dap contextjava.io.IOExceptionprotected void doData(DapRequest drq, dap4.core.util.DapContext cxt) throws java.io.IOException
* @param cxt The dap context
java.io.IOExceptionprotected void addCommonHeaders(DapRequest drq) throws java.io.IOException
java.io.IOExceptionprotected DapRequest getRequestState(javax.servlet.http.HttpServletRequest rq, javax.servlet.http.HttpServletResponse rsp) throws java.io.IOException
rq - A Servlet request objectrsp - A Servlet response objectjava.io.IOExceptionprotected void senderror(DapRequest drq, int httpcode, java.lang.Throwable t) throws java.io.IOException
drq - DapRequesthttpcode - 0=>no code specifiedt - exception that caused the error; may be nulljava.io.IOExceptionpublic static java.lang.String printDMR(dap4.core.dmr.DapDataset dmr)