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
DispatchHandlerinit in interface DispatchHandlerservlet - 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.DispatchServletpublic void init(javax.servlet.http.HttpServlet servlet,
org.jdom.Element config,
BesApi besApi)
throws java.lang.Exception
init in interface DispatchHandlerjava.lang.Exceptionpublic boolean requestCanBeHandled(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
requestCanBeHandled in interface DispatchHandlerrequest - 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 DispatchHandlerrequest - 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 DispatchHandlerreq - The request for which we need to get a last modified date.HttpServletpublic void destroy()
DispatchHandlerdestroy in interface DispatchHandlerpublic void handleWcsRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws WcsException,
java.lang.InterruptedException
WcsExceptionjava.lang.InterruptedExceptionpublic void handleWcsRequest(org.jdom.Element wcsRequest,
java.lang.String serviceUrl,
java.lang.String requestUrl,
javax.servlet.http.HttpServletResponse response)
throws WcsException,
java.lang.InterruptedException
WcsExceptionjava.lang.InterruptedExceptionpublic void handleWcsError(WcsExceptionReport er, javax.servlet.http.HttpServletResponse response)
public void sendWcsResponse(org.jdom.Document wcsResponse,
javax.servlet.http.HttpServletResponse response)
throws WcsException
WcsExceptionpublic org.jdom.Document parseWcsRequest(java.io.BufferedReader sis,
java.lang.String encoding)
throws WcsException
WcsExceptionpublic org.jdom.Document getCapabilities(GetCapabilitiesRequest wcsRequest, java.lang.String serviceUrl) throws java.lang.InterruptedException, WcsException
getCapabilities in interface WcsResponderjava.lang.InterruptedExceptionWcsExceptionpublic org.jdom.Document describeCoverage(DescribeCoverageRequest wcsRequest) throws java.lang.InterruptedException, WcsException
describeCoverage in interface WcsResponderjava.lang.InterruptedExceptionWcsExceptionpublic 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.IOExceptionPPTExceptionBadConfigurationExceptionBESErrorpublic static WCS.REQUEST getRequestType(org.jdom.Element req) throws WcsException
WcsExceptionpublic java.lang.String getEncoding(javax.servlet.http.HttpServletRequest request)
public java.io.BufferedReader getRequestReader(javax.servlet.http.HttpServletRequest request)
throws WcsException
WcsException