public class XmlRequestHandler extends java.lang.Object implements DispatchHandler, WcsResponder
Modifier and Type | Class and Description |
---|---|
static class |
XmlRequestHandler.NoOpEntityResolver |
Modifier and Type | Field and Description |
---|---|
protected org.jdom.Element |
_config |
protected boolean |
_initialized |
protected java.lang.String |
_prefix |
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
XmlRequestHandler() |
Modifier and Type | Method and Description |
---|---|
org.jdom.Document |
describeCoverage(DescribeCoverageRequest wcsRequest) |
void |
destroy()
Called when the servlet is shutdown.
|
org.jdom.Document |
getCapabilities(GetCapabilitiesRequest wcsRequest,
java.lang.String serviceUrl) |
java.lang.String |
getEncoding(javax.servlet.http.HttpServletRequest request) |
long |
getLastModified(javax.servlet.http.HttpServletRequest req) |
java.io.BufferedReader |
getRequestReader(javax.servlet.http.HttpServletRequest request) |
static WCS.REQUEST |
getRequestType(org.jdom.Element req) |
void |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
handleWcsError(WcsExceptionReport er,
javax.servlet.http.HttpServletResponse response) |
void |
handleWcsRequest(org.jdom.Element wcsRequest,
java.lang.String serviceUrl,
java.lang.String requestUrl,
javax.servlet.http.HttpServletResponse response) |
void |
handleWcsRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
init(javax.servlet.http.HttpServlet servlet,
org.jdom.Element config)
Since a constructor cannot be defined for an interface there needs to
be a way to initialize the objects state.
|
void |
init(javax.servlet.http.HttpServlet servlet,
org.jdom.Element config,
BesApi besApi) |
org.jdom.Document |
parseWcsRequest(java.io.BufferedReader sis,
java.lang.String encoding) |
boolean |
requestCanBeHandled(javax.servlet.http.HttpServletRequest request) |
void |
sendCoverageResponse(GetCoverageRequest req,
javax.servlet.http.HttpServletResponse response) |
void |
sendWcsResponse(org.jdom.Document wcsResponse,
javax.servlet.http.HttpServletResponse response) |
protected org.slf4j.Logger log
protected boolean _initialized
protected java.lang.String _prefix
protected org.jdom.Element _config
public void init(javax.servlet.http.HttpServlet servlet, org.jdom.Element config) throws java.lang.Exception
DispatchHandler
init
in interface DispatchHandler
servlet
- This should be the IsoDispatchHandler that creates the
instance of IsoDispatchHandler that is being intialized.config
- A JDOM Element objct containing the XML Element that
announced which implementation of IsoDispatchHandler to use. It may (or
may not) contain additional confguration information.java.lang.Exception
- When the bad things happen.DispatchServlet
public void init(javax.servlet.http.HttpServlet servlet, org.jdom.Element config, BesApi besApi) throws java.lang.Exception
init
in interface DispatchHandler
java.lang.Exception
public boolean requestCanBeHandled(javax.servlet.http.HttpServletRequest request) throws java.lang.Exception
requestCanBeHandled
in interface DispatchHandler
request
- The request to be handled.java.lang.Exception
- When the bad things happen.public void handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
handleRequest
in interface DispatchHandler
request
- The request to be handled.response
- The response object into which the response information
will be placed.java.lang.Exception
- When the bad things happen.public long getLastModified(javax.servlet.http.HttpServletRequest req)
getLastModified
in interface DispatchHandler
req
- The request for which we need to get a last modified date.HttpServlet
public void destroy()
DispatchHandler
destroy
in interface DispatchHandler
public void handleWcsRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws WcsException, java.lang.InterruptedException
WcsException
java.lang.InterruptedException
public void handleWcsRequest(org.jdom.Element wcsRequest, java.lang.String serviceUrl, java.lang.String requestUrl, javax.servlet.http.HttpServletResponse response) throws WcsException, java.lang.InterruptedException
WcsException
java.lang.InterruptedException
public void handleWcsError(WcsExceptionReport er, javax.servlet.http.HttpServletResponse response)
public void sendWcsResponse(org.jdom.Document wcsResponse, javax.servlet.http.HttpServletResponse response) throws WcsException
WcsException
public org.jdom.Document parseWcsRequest(java.io.BufferedReader sis, java.lang.String encoding) throws WcsException
WcsException
public org.jdom.Document getCapabilities(GetCapabilitiesRequest wcsRequest, java.lang.String serviceUrl) throws java.lang.InterruptedException, WcsException
getCapabilities
in interface WcsResponder
java.lang.InterruptedException
WcsException
public org.jdom.Document describeCoverage(DescribeCoverageRequest wcsRequest) throws java.lang.InterruptedException, WcsException
describeCoverage
in interface WcsResponder
java.lang.InterruptedException
WcsException
public void sendCoverageResponse(GetCoverageRequest req, javax.servlet.http.HttpServletResponse response) throws java.lang.InterruptedException, WcsException, java.io.IOException, PPTException, BadConfigurationException, BESError
req
- A GetCoverageREquest object.response
- The HttpServletResponse to which the coverage will be sent.WcsException
- When bad things happen.java.lang.InterruptedException
- When it gets interrupted.java.io.IOException
PPTException
BadConfigurationException
BESError
public static WCS.REQUEST getRequestType(org.jdom.Element req) throws WcsException
WcsException
public java.lang.String getEncoding(javax.servlet.http.HttpServletRequest request)
public java.io.BufferedReader getRequestReader(javax.servlet.http.HttpServletRequest request) throws WcsException
WcsException