Package thredds.server.opendap.servlet
Class ReqState
- java.lang.Object
-
- thredds.server.opendap.servlet.ReqState
-
public class ReqState extends Object
User requests get cached here so that downstream code can access the details of the request information.
-
-
Constructor Summary
Constructors Constructor Description ReqState(javax.servlet.http.HttpServletRequest myRequest, javax.servlet.http.HttpServletResponse response, String dataPath, String encodedurl, String encodedquery)ReqState(AbstractServlet sv, javax.servlet.http.HttpServletRequest myRequest, javax.servlet.http.HttpServletResponse response, String rootPath2, String encodedurl, String encodedquery)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetAcceptsCompressed()************************************************************************* Evaluates the (private) request object to determine if the client that sent the request accepts compressed return documents.StringgetConstraintExpression()StringgetDASCache(String realpath)This method will attempt to get the DAS cache directory name from the servlet's InitParameters.StringgetDataSet()StringgetDDSCache(String realpath)This method will attempt to get the DDS cache directory name from the servlet's InitParameters.StringgetDDXCache(String realpath)This method will attempt to get the DDX cache directory name from the servlet's InitParameters.StringgetDodsBlobURL_OLDANDBUSTED()StringgetINFOCache(String realpath)This method will attempt to get the INFO cache directory name from the servlet's InitParameters.StringgetInitParameter(String name)***********************************************************************javax.servlet.http.HttpServletRequestgetRequest()StringgetRequestSuffix()StringBuffergetRequestURL()javax.servlet.http.HttpServletResponsegetResponse()StringgetRootPath()StringgetSchemaLocation()This method will attempt to get the Schema Location name from the servlet's InitParameters.StringgetServerClassName()ObjectgetUserObject()protected voidprocessDodsURL()************************************************************************* Processes an incomingHttpServletRequest.voidsetDefaultDASCache(String cachedir)Sets the default DAS Cache directory name to the string cachedir.voidsetDefaultDDSCache(String cachedir)Sets the default DDS Cache directory name to the string cachedir.voidsetDefaultDDXCache(String cachedir)Sets the default DDX Cache directory name to the string cachedir.voidsetDefaultINFOCache(String cachedir)Sets the default INFO Cache directory name to the string cachedir.voidsetDefaultSchemaLocation(String location)Sets the default Schema Location to the string location.voidsetUserObject(Object userObj)StringtoString()
-
-
-
Constructor Detail
-
ReqState
public ReqState(javax.servlet.http.HttpServletRequest myRequest, javax.servlet.http.HttpServletResponse response, String dataPath, String encodedurl, String encodedquery)
-
ReqState
public ReqState(AbstractServlet sv, javax.servlet.http.HttpServletRequest myRequest, javax.servlet.http.HttpServletResponse response, String rootPath2, String encodedurl, String encodedquery) throws opendap.dap.DAP2Exception
- Throws:
opendap.dap.DAP2Exception
-
-
Method Detail
-
getDataSet
public String getDataSet()
-
getServerClassName
public String getServerClassName()
-
getRequestSuffix
public String getRequestSuffix()
-
getConstraintExpression
public String getConstraintExpression()
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest()
-
getResponse
public javax.servlet.http.HttpServletResponse getResponse()
-
getRootPath
public String getRootPath()
-
getDDXCache
public String getDDXCache(String realpath)
This method will attempt to get the DDX cache directory name from the servlet's InitParameters. Failing this it will return the default DDX cache directory name.- Parameters:
realpath- path to this servlet's dir in webapps- Returns:
- The name of the DDX cache directory(ending in '/').
-
setDefaultDDXCache
public void setDefaultDDXCache(String cachedir)
Sets the default DDX Cache directory name to the string cachedir. Note that if the servlet configuration conatins an Init Parameter DDXCache the default value will be ingnored.- Parameters:
cachedir-
-
getDDSCache
public String getDDSCache(String realpath)
This method will attempt to get the DDS cache directory name from the servlet's InitParameters. Failing this it will return the default DDS cache directory name.- Parameters:
realpath- path to this servlet's dir in webapps- Returns:
- The name of the DDS cache directory(ending in '/').
-
setDefaultDDSCache
public void setDefaultDDSCache(String cachedir)
Sets the default DDS Cache directory name to the string cachedir. Note that if the servlet configuration conatins an Init Parameter DDSCache the default value will be ingnored.- Parameters:
cachedir-
-
getDASCache
public String getDASCache(String realpath)
This method will attempt to get the DAS cache directory name from the servlet's InitParameters. Failing this it will return the default DAS cache directory name.- Parameters:
realpath- path to this servlet's dir in webapps- Returns:
- The name of the DAS cache directory (ending in '/')
-
setDefaultDASCache
public void setDefaultDASCache(String cachedir)
Sets the default DAS Cache directory name to the string cachedir. Note that if the servlet configuration conatins an Init Parameter DASCache the default value will be ignored.- Parameters:
cachedir-
-
getINFOCache
public String getINFOCache(String realpath)
This method will attempt to get the INFO cache directory name from the servlet's InitParameters. Failing this it will return the default INFO cache directory name.- Parameters:
realpath- path to this servlet's dir in webapps- Returns:
- The name of the INFO cache directory(ending in '/').
-
setDefaultINFOCache
public void setDefaultINFOCache(String cachedir)
Sets the default INFO Cache directory name to the string cachedir. Note that if the servlet configuration conatins an Init Parameter INFOcache the default value will be ingnored.- Parameters:
cachedir-
-
getSchemaLocation
public String getSchemaLocation()
This method will attempt to get the Schema Location name from the servlet's InitParameters. Failing this it will return the default Schema Location.- Returns:
- The Schema Location.
-
setDefaultSchemaLocation
public void setDefaultSchemaLocation(String location)
Sets the default Schema Location to the string location. Note that if the servlet configuration conatins an Init Parameter SchemaLocation the default value will be ingnored.- Parameters:
location-
-
processDodsURL
protected void processDodsURL()
************************************************************************* Processes an incomingHttpServletRequest. Uses the content of theHttpServletRequestto create aReqStateobject in that caches the values for:- dataSet The data set name.(Accessible using
setDataSet()andgetDataSet()) - CE The constraint expression.(Accessible using
setCE()andgetCE()) - requestSuffix The request suffix, used by OPeNDAP DAP2 to
indicate the type of response desired by the client.
(Accessible using
setRequestSuffix()andgetRequestSuffix()) - isClientCompressed Does the requesting client accept a compressed response?
- ServletConfig The
ServletConfigobject for this servlet. - ServerName The class name of this server.
- RequestURL THe URL that that was used to call thye servlet.
- See Also:
ReqState
- dataSet The data set name.(Accessible using
-
getAcceptsCompressed
public boolean getAcceptsCompressed()
************************************************************************* Evaluates the (private) request object to determine if the client that sent the request accepts compressed return documents.- Returns:
- True is the client accpets a compressed return document. False otherwise.
-
getInitParameter
public String getInitParameter(String name)
***********************************************************************
-
getDodsBlobURL_OLDANDBUSTED
public String getDodsBlobURL_OLDANDBUSTED()
-
getUserObject
public Object getUserObject()
-
setUserObject
public void setUserObject(Object userObj)
-
getRequestURL
public StringBuffer getRequestURL()
-
-