public abstract class DapController extends Object implements org.springframework.web.context.ServletContextAware
Modifier and Type | Field and Description |
---|---|
protected static String |
BIG_ENDIAN |
protected static long |
binarywritelimit |
protected ByteOrder |
byteorder |
protected static DapCache |
cache |
protected boolean |
compress |
protected String |
controllerpath |
protected static String |
DATAEXT |
static boolean |
DEBUG |
static long |
DEFAULTBINARYWRITELIMIT |
protected static String |
DMREXT |
protected DapDSR |
dsrbuilder |
protected static String |
DSREXT |
protected static String[] |
ENDINGS |
protected static String |
FAVICON |
protected static boolean |
IS_BIG_ENDIAN |
protected static String |
LITTLE_ENDIAN |
static boolean |
PARSEDEBUG |
protected String |
resourcepath |
protected javax.servlet.ServletContext |
servletcontext |
Constructor and Description |
---|
DapController(String controllerpath) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCommonHeaders(DapRequest drq) |
protected CEConstraint |
buildconstraint(DapRequest drq,
String sce,
DapDataset dmr)
If the request has a constraint, then parse it
else use the universal constraint
|
protected abstract void |
doCapabilities(DapRequest drq)
Process a capabilities request.
|
protected void |
doData(DapRequest drq)
Process a DataDMR request.
|
protected void |
doDMR(DapRequest drq)
Process a DMR request.
|
protected void |
doDSR(DapRequest drq)
Process a DSR request.
|
protected abstract void |
doFavicon(DapRequest drq,
String icopath)
Process a favicon request.
|
protected 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.
|
protected abstract String |
getResourcePath(DapRequest drq,
String relpath)
Convert a URL path into an absolute file path
|
void |
handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
init() |
protected void |
senderror(DapRequest drq,
int httpcode,
Throwable t)
Generate an error based on the parameters
|
static void |
setBinaryWritelimit(long limit) |
protected static void |
setCache(DapCache cache) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
public static final boolean DEBUG
public static final boolean PARSEDEBUG
protected static final String BIG_ENDIAN
protected static final String LITTLE_ENDIAN
protected static boolean IS_BIG_ENDIAN
protected static final String DMREXT
protected static final String DATAEXT
protected static final String DSREXT
protected static final String[] ENDINGS
protected static final String FAVICON
public static final long DEFAULTBINARYWRITELIMIT
protected static DapCache cache
protected static long binarywritelimit
protected boolean compress
protected transient ByteOrder byteorder
protected transient DapDSR dsrbuilder
protected transient String controllerpath
protected transient String resourcepath
protected transient javax.servlet.ServletContext servletcontext
public DapController(String controllerpath)
protected static void setCache(DapCache cache)
protected static DapCache getCache()
public static void setBinaryWritelimit(long limit)
public void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext
in interface org.springframework.web.context.ServletContextAware
protected abstract void doFavicon(DapRequest drq, String icopath) throws IOException
drq
- The merged dap stateIOException
protected abstract void doCapabilities(DapRequest drq) throws IOException
drq
- The merged dap stateIOException
protected abstract String getResourcePath(DapRequest drq, String relpath) throws IOException
drq
- The wrapped request infoIOException
protected abstract long getBinaryWriteLimit()
@PostConstruct public void init() throws javax.servlet.ServletException
javax.servlet.ServletException
public void handleRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws IOException
IOException
protected void doDSR(DapRequest drq) throws IOException
IOException
protected void doDMR(DapRequest drq) throws IOException
drq
- The merged dap stateIOException
protected void doData(DapRequest drq) throws IOException
drq
- The merged dap stateIOException
protected void addCommonHeaders(DapRequest drq) throws IOException
IOException
protected DapRequest getRequestState(javax.servlet.http.HttpServletRequest rq, javax.servlet.http.HttpServletResponse rsp) throws IOException
rq
- A Servlet request objectrsp
- A Servlet response objectIOException
protected void senderror(DapRequest drq, int httpcode, Throwable t) throws IOException
drq
- DapRequesthttpcode
- 0=>no code specifiedt
- exception that caused the error; may be nullIOException
protected CEConstraint buildconstraint(DapRequest drq, String sce, DapDataset dmr) throws IOException
drq
- sce
- string of the constraintIOException
Copyright © 1999–2018 UCAR/Unidata. All rights reserved.